Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
pankajace12
Posts: 194
Registered: ‎04-30-2011
My Device: Software
My Carrier: Airtel

Re: Twitter is Integrated in BlackBerry

Hi Anjali

 

If you provide url in CallbackURL, then you don't need this pin. even it will handle itself.

 

Thanks

Pawan

Please use plain text.
Developer
pravipravi
Posts: 38
Registered: ‎06-03-2009
My Device: 9800
My Carrier: Verizone

Re: Twitter is Integrated in BlackBerry

I am using BlackBerry Storm 9550 device, OS 5.0 JDK 1.5 BlackBerry sdk 5.0 twitter me api twitter_api_me-1.8.3.jar.

 

While running your app, it is asking login page. I have given the login details then it is going to autharize screen . But onAuthorize method is not callled . Is this anything related to Browser ?

 

At last it is responding with the callback URL. Posting is not happened.

 

Could u please tell me what I am missing ?

 

Here is my code

public void onAuthorize(final Token token) {

			final Token myToken = token;
			_tokenValue = StoreToken.fetch();
			_tokenValue.token = myToken.getToken();
			_tokenValue.secret = myToken.getSecret();
			_tokenValue.userId = myToken.getUserId();
			_tokenValue.username = myToken.getUsername();
			_tokenValue.save();

			UiApplication.getUiApplication().invokeLater( new Runnable() {

				public void run() {
					deleteAll();
					Credential c = new Credential(CONSUMER_KEY,	CONSUMER_SECRET, myToken);
					TweetToFriend tw = new TweetToFriend();
					String message="Hi Testing twitter Golflogix BB";
					boolean done=false;
					done=tw.doTweet(message, c);
					if(done == true)
					{
						Dialog.alert( "Tweet succusfully..." );
						close();	
					}
				}
			});

		}

 

Please use plain text.
Contributor
amma12345
Posts: 23
Registered: ‎10-17-2011
My Device: 9700
My Carrier: NA

Re: Twitter is Integrated in BlackBerry

Hi Pawan,

                       I am giving the callback url , but it giving the error like :Error Authenticating  user : desktop application only support auth call back values.

 

Regards

Anjali

Please use plain text.
Developer
pankajace12
Posts: 194
Registered: ‎04-30-2011
My Device: Software
My Carrier: Airtel

Re: Twitter is Integrated in BlackBerry

Hello Anjali

 

I don't know where you are lacking in the code. I have not face this issue at my end.

 

Thanks

Pawan

Please use plain text.
New Developer
estebanuri
Posts: 28
Registered: ‎11-04-2009
My Device: Not Specified

Re: Twitter is Integrated in BlackBerry

I get lost following this thread.

So, where can I find a zip with a working sample source code?

 

Thanks in advance.

 

I tried to change the world, but I couldn't find the source code
Please use plain text.
New Contributor
samintechvalens
Posts: 7
Registered: ‎09-21-2011
My Device: Torch 9800
My Carrier: Software Developer

Re: Twitter is Integrated in BlackBerry

Hello Pankaj,

 

Can you please provide the JAR file which you have used in this application to implement twitter. 

I had searched alot but unable to find it.

Please use plain text.
Developer
pankajace12
Posts: 194
Registered: ‎04-30-2011
My Device: Software
My Carrier: Airtel

Re: Twitter is Integrated in BlackBerry

Hi

 

PFA the jar file.

 

Thanks

Pawan

Please use plain text.
New Contributor
rickyintech
Posts: 8
Registered: ‎08-22-2012
My Device: 9800-Tourch
My Carrier: MDS

Re: Twitter is Integrated in BlackBerry

Hi pawan your code is nice but could you attach your running code because i m not getting the compatible jar file. or can you able to send the code on another e-mail.

Please use plain text.
Developer
pankajace12
Posts: 194
Registered: ‎04-30-2011
My Device: Software
My Carrier: Airtel

Re: Twitter is Integrated in BlackBerry

Hi

 

PFA the entire code.

 

Thanks

Pawan

Please use plain text.
New Contributor
rickyintech
Posts: 8
Registered: ‎08-22-2012
My Device: 9800-Tourch
My Carrier: MDS

Re: Twitter is Integrated in BlackBerry

Hi Pawan thanks for code
Please use plain text.