Hi All,
Please can anyone help me with a problem I’m having with Facebook v4. Its my first time using it and its taken me a bit of time to navigate through it all. The problem i’m having relates to the android version of my app, the IOS version is working fine.
The problem seems to centre around accessing certain features of Facebook through my app after login in. As mention above, I’m not having any problem accessing these features in the IOS version so I can safely rule out that I’ve entered something in incorrectly when integrating Facebook into the app.
Basically though when a user wants to access Facebook through my app, they first have to login and authorise the read only aspect of Facebook, then they confirm and athorise the extended permissions so the user can post messages etc on Facebook. Both the IOS and the Android version build fine, load the plugin and allow the user to do the initial login without issue. On the Android version the app then appears to skip over requesting extended permission so when the user then attempts to send a post with an image after losing in nothing happens on the android version where as the IOS version with upload the message and image to Facebook.
I think there probably something slightly different I need to do with the Android version to be able to get complete access to all of Facebook features but when it came to looking at permission for Android it go very complicated. I can confirm I have the latest build of Xcode, Corona and I’m using Java SE 6, which as mention has no problems running the app, its just certain feature that are’t working after logging into Facebook.
I’ve set the app up to return a native alert message to confirm a successful login, so again I’m confident it only a minor issue but on that difficult to put a finger on.
Here is the actual code to login:
function attributes.onComplete(event) facebook.login( fbAppID, attributes.facebookExtendedListener, { "publish\_actions", "user\_birthday" },attributes.facebookExtendedListener); end
function attributes.facebookListener( event ) if ( "session" == event.type ) then -- Upon successful login, request list of friends if ( "login" == event.phase) then attributes.access\_token = event.token native.showAlert( "Notice", "Please confirm extended permissions.", { "OK" },attributes.onComplete); end elseif ( "dialog" == event.type ) then print( event.response ); end end facebook.login( fbAppID, attributes.facebookListener, { "user\_friends", "email" } );
(apologise for the way the code has pasted in the box, unfortunatley its made the code look a little messy ).
If any one can help please that be amazing, like wise if you need me to provide anything else to help please just let me know.
Many thanks
Kind Regards
Liam