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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Developer
Posts: 132
Registered: ‎11-20-2009
My Device: Not Specified
Accepted Solution

Facebook SDK problems

Hey

 

Yesturday the Facebook SDK and strawberry was working perfectly fine for me. I am using it today and it seems like http://m.facebook.com/login has changed, and when you successfully login it is no longer forwarding to the same page as yesturday. In addition, it seems like the new page is not giving a auth_token? 

 

Can anyone try their strawberry project (or facebook SDK that used to work) and log in and see if they are having the same problem?

 

Thanks

Developer
Posts: 604
Registered: ‎12-27-2010
My Device: Not Specified

Re: Facebook SDK problems

Hmm, I'm getting a page that says "Success" but it isn't appearing to tell my app that I've logged in like it used to.

Developer
Posts: 132
Registered: ‎11-20-2009
My Device: Not Specified

Re: Facebook SDK problems

Exactly,

 

upon closer examination, it looks like in the LoginScreen.java at the following code

	public void onAction(Action event) {
		if (event.getSource() == this) 
		{	
			if (event.getAction().equals(ACTION_SUCCESS) && getUrl().startsWith(settings.nextUrl)) {
				String url = getUrl();
				log.info("(LoginScreen.ACTION_SUCCESS) URL: " + url);
				int startIndex = url.indexOf("auth_token");
					
			if (startIndex > -1) {
							
					int stopIndex = url.length();

					if (url.indexOf('&', startIndex) > -1) {
						stopIndex = url.indexOf('&', startIndex);
					} else if (url.indexOf(';', startIndex) > -1) {
						stopIndex = url.indexOf(';', startIndex);
					}

					String authToken = url.substring(url.indexOf('=', startIndex) + 1, stopIndex);
					log.debug("auth_token = " + authToken);
								
					fireAction(ACTION_LOGGED_IN, authToken);
				}
			}
		}
	}

 

the url does not contain "auth_token" in it, and as a result it never fires the fireAction(ACTION_LOGGED_IN). 

 

Does anyone know how to fix this or a work around?

 

Contributor
Posts: 15
Registered: ‎12-28-2010
My Device: Not Specified

Re: Facebook SDK problems

I have the same problem!

I download the Facebook SDK from sourforge and it's the same, without changes:

http://sourceforge.net/projects/facebook-bb-sdk/files/

 

I get the "Success" screen and the program (Strawberry) stop in it.

 

Have somebody any solution?

Developer
Posts: 604
Registered: ‎12-27-2010
My Device: Not Specified

Re: Facebook SDK problems

Figured out what might be a workaround (haven't fully tested yet). Instead of calling the login screen before the permissions screen, just call the permissions screen. It will redirect you to the Login page and then might be working after that. Going to test out the functionality now.

Developer
Posts: 132
Registered: ‎11-20-2009
My Device: Not Specified

Re: Facebook SDK problems

jprofitt let me know if that approach works for you, so far none of mine are working out too well.

Developer
Posts: 604
Registered: ‎12-27-2010
My Device: Not Specified

Re: Facebook SDK problems

False alarm. But I think I'm closer to understanding what to do to fix this. The login_success.html page should be redirected to login_success.html#access_token=.... but the BrowserScreen doesn't have the extra bits at the end, just login_success.html. Trying to find out where it parses through the URLs and have it include the entire URL.

Developer
Posts: 132
Registered: ‎11-20-2009
My Device: Not Specified

Re: Facebook SDK problems

Anyone have any luck with fixing this issue? This pretty much screws up the Blackberry SDK...

Highlighted
Developer
Posts: 484
Registered: ‎07-17-2008
My Device: Not Specified

Re: Facebook SDK problems

The facebook part of our app isn't working anymore either.

 

I knew this was going to happen...

 

These 3rd party APIs always have problems when things change.

 

I don't know why RIM couldn't just release a decent API for facebook.

Contributor
Posts: 15
Registered: ‎12-28-2010
My Device: Not Specified

Re: Facebook SDK problems

Facebook said something? because I have been watching in Facebook and nobody said it.....

Does anyone know an alternative method?