Tiwtter integration
Please Login to Remove!
hello,
i have to integrate twitter in my bb app. I download twitter_api_me-1.4.jar & twitter_api_me-1.5.jar & add from properties as an external jar in eclipse
i got code from net to verify credentials & post tweet . I am using twitter_api_me-1.4.jar . I am using oAuth to verify credentials which means i use token in credentials not password as in xAuth jsut like this:-
Credential c = new Credential(USER_NAME, CONSUMER_KEY, CONSUMER_SECRET,token);
then i use following statemnet:-
to verify credentials i use :-
if(m.verifyCredential()){
Dialog.alert("You are now logged in");
To post tweet i use:-
Tweet t = new Tweet("Hi!!! This is my first tweet via Twitter API ME.");
TweetER ter = TweetER.getInstance(m);
t = ter.post(t);
Dialog.alert("Posted");
Alas! it gives App Error 104 Uncaught: Securtiy Exception at this statement:-
t = ter.post(t);
any have any idea why it is giving this error on posting tweet statement even after verifying credentials??
Since this is my first experience to integrate twitter in bb app...i have no idea about its flow.. i explain what i mean..As in facebook its flow includes:-
1) First of all login page will be displayed
2) user will provide username & password
3) User status will be updated /at this step message will be posted on user wall
At first i thought that twitter flow must be like this as we cant give hardcoded username as in that case it will post tweet or update status of only one user BUT from net i got code in which it provie username in credential which means according to my thinking( i could be wrong also) that this will make my app dependent on only one user ...It will verify credentials of same user each time & post tweet on that user wall only which is bad approach
I have no idea whether twitter flow will just like this or not..
IF BLACKBERRY EXPERTS CAN GIVE SUGGESTION THEN PLEASE PROVIDE ME SOME DETAIL IN SHORT STATEMENT ABOUT TWITTER FLOW
|