AppInventor: Twitter

From OnnoWiki
Jump to navigation Jump to search

Sumber: http://puravidaapps.com/twitter.php

A quick Twitter Tutorial with App Inventor 2

Let's tweet with App Inventor 2! Now in App Inventor 2 we also can tweet with images! The App Inventor team did a great job, everything is so easy to do, and I know what I'm talking about, see my Twitter example using the web component, where I did everything by hand, which was a nightmare.

NewNow no TwitPic API key required anymore! Preparation: Get a Twitter Consumer key and Consumer secret.

You already have a Twitter account. Now follow the documentation to get a Consumer key and Consumer secret.



Login

As mentioned in the documentation, App Inventor does all the "ugly" work for you: Login is handled using the OAuth protocol, as required by the Twitter API ( dev.twitter.com/pages/auth ). An App Inventor app that needs to make Twitter API calls on behalf of an authenticated user should first call Authorize. This loads a Twitter login page that will allow the user to login with their username and password, and then return appropriate credentials to the Twitter component in the app. Once the Twitter component has the credentials the IsAuthorized event is raised to let the app know that it can proceed with Twitter API calls. Tweet

This snippet shows how to tweet with or without image.



Referensi


Pranala Menarik