Facebook authorization token and network status

I need to use the Facebook API and have access to the authorization token.

Is this supported in Corona’s Facebook module? I can’t find any hint in the docs.

Also, I’m trying not to leave my users hanging while I’m sending my info to my server and to Facebook and back. I need to have a way to know when the actual network transmission is started, so I can show a progress widget.

If not, as far as I understand I just need to make my own FB module based on web popups and OAuth? [import]uid: 8145 topic_id: 10894 reply_id: 310894[/import]

@Wizem, what are you wanting to do?

To Post messages to a user’s wall, then Peach Pellen has some lovely tutorials for how to use FaceBook and Twitter at her site.

If it is something else that you want to do for which you need to persist the authentication token, etc please iterate what you are after to be able to help you

cheers,

?:slight_smile: [import]uid: 3826 topic_id: 10894 reply_id: 39626[/import]

I need to send the token to my server, which will request various commands in the name of the client (get friends, then do some database queries with their IDs, and return the result to the client).

I also want a Facebook login to fully synchronize my app with my server. I need to validate the login, so I again need access to more Facebook API message details.

This is one of the last things I need to finish my social isometric game. [import]uid: 8145 topic_id: 10894 reply_id: 39669[/import]

Thought I’d add in some screenshots. Ansca, if there’s a possible fix that will solve my problem in a daily build, we’re hoping our game will be popular, have a lot of PR planned, and I think this will be good for Corona.

http://dl.dropbox.com/u/14226211/IMG_0610.PNG
http://dl.dropbox.com/u/14226211/IMG_0629.PNG
http://dl.dropbox.com/u/14226211/IMG_0666.PNG
http://dl.dropbox.com/u/14226211/IMG_0668.PNG
http://dl.dropbox.com/u/14226211/IMG_0670.PNG
http://dl.dropbox.com/u/14226211/IMG_0672.PNG [import]uid: 8145 topic_id: 10894 reply_id: 39674[/import]

facebook problems?

Peach has some great tutorials on it.

If not, please enter a bug, let me know the ticket number and I will fast track it.

C. [import]uid: 24 topic_id: 10894 reply_id: 39690[/import]

Unfortunately, I’ve already implemented all the functionality Peach describes, and more, and I need yet more, and it appears to be missing. (I’m referring to http://techority.com/2011/03/08/add-facebook-posting-to-your-corona-iphone-app/ and http://techority.com/2010/12/21/add-facebook-posting-to-your-iphone-app/ )

Not very pleasant the way nobody will take time to understand my problem.

I suppose implementing the facebook module myself is a fix to this problem, and it appears there’s no way around this due to lack of forthcoming. [import]uid: 8145 topic_id: 10894 reply_id: 39696[/import]

Facebook API and have access to the authorization token >>Is this supported in Corona’s Facebook module?

No it is not supported.

For network, you can setup a activity indicator but you will have a hard time since the connection is being done outside of corona.

C.

[import]uid: 24 topic_id: 10894 reply_id: 39700[/import]

Thanks.

I’ve pretty much gotten around the issue of a timeout by letting the user cancel at any time, but I’ll still need the token. I guess I know what to do. =) [import]uid: 8145 topic_id: 10894 reply_id: 39702[/import]

Wizem…I’ve spent a good bit of time with the Facebook api and I don’t think you want to write this yourself unless you absolutely have to. I recommend making a feature request to get access to the auth token in the Corona Facebook module…a lot of people could use this and it would be easy for Ansca to expose it… [import]uid: 6175 topic_id: 10894 reply_id: 39899[/import]

yes, I need facebook auth token too. [import]uid: 12088 topic_id: 10894 reply_id: 39900[/import]

if you have a look at the Facbook SDK for iOS, you will get an idea of how to get the token, etc via http, and you will have to then use a similar thing using the socket.http or similar services to get and mange that yourself, it ain’t going to be pretty, where CoronaSDK is all about 1-5 lines of code, this will be pretty lengthy and daunting

cheers,

?:slight_smile: [import]uid: 3826 topic_id: 10894 reply_id: 39901[/import]

Since this was urgent for me, I implemented a custom js/php-based facebook login page on my server, and I use that + redirect links to get facebook data into my app.

[import]uid: 8145 topic_id: 10894 reply_id: 40180[/import]

@Wizem can u pls describe the method to get the fb access token.
i needed that badly to get my friends list of app users.
pls [import]uid: 69231 topic_id: 10894 reply_id: 48533[/import]

You need your custom html page to handle responses from Facebook. When the user logs in, you get a response with the token. You need to redirect the user to a URL, again on your server, with the token in the parameters list. Then you need to handle that URL change in your client’s web popup handler, parse the URL and get the token out of it.

P.S. Feel free to ask any additional questions, but the gist of it is you’ll need to take a look at the original Facebook documentation and implement that on your server, sending data to your app via URL’s. [import]uid: 8145 topic_id: 10894 reply_id: 48543[/import]

i have one question…
if we are login using our device then how do we get credentials of user on that custom page so that we are able to get response with token??? [import]uid: 69231 topic_id: 10894 reply_id: 48560[/import]

The page handles Facebook’s response instead of the device via javascript… [import]uid: 8145 topic_id: 10894 reply_id: 48581[/import]

@Wizem
will u pls post the steps to obtain this functionality.
i got some idea but it will be more useful if u post the steps which will help me to get the points clearly…
Thanx in advance for gr8 idea.
[import]uid: 69231 topic_id: 10894 reply_id: 48584[/import]

Are there any plans to make the Facebook auth token available to us? I’m needing to do SSO with my own server, and using the Facebook auth token is how I was planning to verify the user is authenticated. [import]uid: 84258 topic_id: 10894 reply_id: 60406[/import]

Hi all,

we’ve working on an app which needs user token.

As Carlos pointed out in this thread, getting the token was not supported at the time of this discussion.

But i found in the sample code in the facebook api doc the string:

print (event.token)

in every case it seems to be always nil.

The question is, event.token is not or is supported? And if it is not supported why it is in the api documentation?

Thanks
[import]uid: 107375 topic_id: 10894 reply_id: 76757[/import]

Hey Grandezot,

This was introduced in builds 712 and 714 for iOS and Android respectively - these are daily builds and so only available to subscribers at the current time.

Peach :slight_smile: [import]uid: 52491 topic_id: 10894 reply_id: 76861[/import]