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

Adobe AIR Development

Reply
Developer
Posts: 75
Registered: ‎09-13-2011
My Device: Playbook
My Carrier: None
Accepted Solution

Facebook integration error on login

error on line 9 at column 35: xmlParseEntityRef: no name

 

That's the error I get, I've tried everything and can't seem to solve it. It appears right after I enter my login credentials, I'm running Flash builder 4.5.1 AS3.0 and GraphAPI_Mobile_1_7.swc. I have the App setup on facebook and I'm using the proper APP_ID. This app is going on the BB Playbook with the facebook app fully updated. All I'm trying to do is upload an image to facebook, I've pasted my code below, can someone help me or at least explain to me what this error means? Thanks !!!

 

 

public function fb_share(bmp:Bitmap, _stg:Stage) 
{
stg = _stg;
img = bmp;
FacebookMobile.init(APP_ID, handleInit);
}

protected function handleInit(response:Object, fail:Object):void
{
trace(response + " " + fail);
handleLogin(response, fail);
}

protected function handleLogin(response:Object, fail:Object):void
{
if(response){
var values:Object = {message:'My photo caption', fileName:'FILE_NAME',image:img};
FacebookMobile.api('/me/photos', handleUploadComplete, values,'POST'); 
} else {
FacebookMobile.login(handleLogin, stg, ['user_photos', 'publish_stream']);

 



Show your support and click on the like button when you see a post that was helpful.
New Contributor
Posts: 9
Registered: ‎04-28-2010
My Device: 9950
My Carrier: at&t

Re: Facebook integration error on login

I have nearly the same environment as you and I'm seeing the same issue as well, though the same Facebook integration code works on Android for me. I'll see if there is a difference in the http request / response sent to Facebook.

 

Regards,

Rajesh

Developer
Posts: 75
Registered: ‎09-13-2011
My Device: Playbook
My Carrier: None

Re: Facebook integration error on login

Thanks, I would test it myself on an android but I use QNX a lot and most of the application wouldn't work anyway.


Show your support and click on the like button when you see a post that was helpful.
Developer
Posts: 75
Registered: ‎09-13-2011
My Device: Playbook
My Carrier: None

Re: Facebook integration error on login

Maybe I should ask the question differently, has anyone got facebook sharing to work on the playbook using Flash Builder? 



Show your support and click on the like button when you see a post that was helpful.
Developer
Posts: 144
Registered: ‎12-18-2010
My Device: Limited Edition Z10 & Blackberry Playbook
My Carrier: Rogers Wireless

Re: Facebook integration error on login

This probably isn't a helpful response, but I had Facebook image uploading working in my app with the AS3 lib using the GraphAPI_Mobile_1_6.swc and the FacebookMobile class, but when I checked it on Monday I was getting an error after logging in that says

 

This page contains the following errors:

error on line 2 at column 211: EntityRef: expecting ';'

Below is a rendering of the page up to the first error

 

But the page is a blank white page.  I have not found the cause/solution yet.  Maybe it's caused by the same as your problem.

 

I've looked at the forums for the AS3 Facebook library and there is talk about OAuth 2.0 and needing to make changes to the Facebook developer page. The link to the forum post is here

 

Please let me know if you solve your issue and  I will do the same.

Playbook Apps:
Touch Painter, LinkShrink

BB10 Apps:
NoteToSelf , LinkShrink
New Contributor
Posts: 9
Registered: ‎04-28-2010
My Device: 9950
My Carrier: at&t

Re: Facebook integration error on login

I *think* I found the root cause. Seems that Facebook is now returning a Content-Type of application/xhtml+xml instead of the expected text/html. I've filed a bug with facebook with (hopefully) appropriate http request / response at: http://bugs.developers.facebook.net/show_bug.cgi?id=20617

 

If anyone else has been able to get a network trace and can also verify the issue or create a simpler repro, please update the issue at Facebook.

 

Regards,

Rajesh

 

Developer
Posts: 75
Registered: ‎09-13-2011
My Device: Playbook
My Carrier: None

Re: Facebook integration error on login

have you come up with a workaround for this? if so could you please post it here, thanks.



Show your support and click on the like button when you see a post that was helpful.
Highlighted
Developer
Posts: 75
Registered: ‎09-13-2011
My Device: Playbook
My Carrier: None

Re: Facebook integration error on login

Good news! I may have found a fix, seems to work for me just need to teak my code a bit.

 

you will need to download the graph-api source from here :

http://code.google.com/p/facebook-actionscript-api/downloads/detail?name=GraphAPI_Source_1_7.zip&can...

 

follow the instructions in comment 4 from here :

http://code.google.com/p/facebook-actionscript-api/issues/detail?id=353

 

then you will need to create the structure of your library so that all your import statements work.

 

private message me with your email address and I can send you mine zipped up.

 

Good Luck!

 

 



Show your support and click on the like button when you see a post that was helpful.
New Developer
Posts: 61
Registered: ‎06-07-2011
My Device: Playbook
My Carrier: Employee

Re: Facebook integration error on login

Hi, 

 

When I am trying to login, getting error in a pink box, I attached the image of it. Please help me to fix it.

 

Thanks in advance.

 

Error.JPG

Developer
Posts: 75
Registered: ‎09-13-2011
My Device: Playbook
My Carrier: None

Re: Facebook integration error on login

yes this looks like the same error I had, the above solution should fix this problem. It's caused as rajeshchawla mentioned by an unexpected content type in the response. The tweak in the api calls for the desktop version of the facebook view instead of the touch screen version, on the downside everything is a bit smaller and not optimized for touch screen but I've had no issues with that since the playbook screen is big enough.


Show your support and click on the like button when you see a post that was helpful.