How implement Facebook-Login / facilitate site-register using Facebook - facebook

I want my users to be able to login or register on my Site using their Facebook-Account. Could be either like the user clicks the "Login using Facebook"-Button and is automatically logged in, while his data is saved to the db or he clicks "Login using Facebook" and gets my register-page filled with his data from Facebook.
I already tried the Facebook-register, but I think it doesn't solve the problem for me, because I don't want to change my entire register-dialog to Facebook. I want it additionally.
I managed to generate the "Login using Facebook"-Button using the Java-API. I also managed to get user-data via FQL using the PHP-API. But then I run into huge problems with the token.
I guess I read the (poor) documentation on FB-Developers for 20 times now. The Tutorials I found where either outdated or treat other cases. Besides that seemingly everyone uses another way to access FB.
Does anybody know an easy way to realize that and could clearly explain which functions, APIs, ... to use? Especially I feel like I still haven't totally understood that token-thing.

If someone is stuck with the same problems... For me it helped a lot to drop the JAVA-API and only rely on PHP.
See as well this tutorial: http://thinkdiff.net/facebook/php-sdk-graph-api-base-facebook-connect-tutorial/ (It's also a bit outdated, therefore you have to delete the call to the getSession-Method.)

Related

Facebooks API. What should i choose ? (walltext inside)

I'm a little bit lost.
So, I'm not really trying to integrate facebook with my webproject, but in some point I need to get some information of a fb account... like friend's email, name, status and some other things...
From what I read so far, it seems that it's no longer possible to get friends' email and some other information without the friends authorize you app to do that, at least when using the last api from fb (graph api)... so I thought that was something impossible to do, until I see some sites (like yahoo) offering a possibility to import your contacts from your fb account without his friends authorize. Does anyone know how they do that?
I tried using other apis, like facebook-java-api, restFB, and others but in all cases I'm getting some kind of error... so if someone could at least give me a direction or something like that... have you done this? or know how to? using which api?
some info: I'm developing in Java with Eclipse, using tomcat as my web server.
well it's a little bit confusing since its not a technical issue, but if someone could help me pointing some direction I could tell each error i got when trying to go this direction or something like that.
You dont HAVE to use an SDK at all... Basically the only URL you need to be aware of is graph.facebook.com and you can just make HTTP requests to that URL. You might want to look into the facebook connect feature too.

Displaying MY public wall using AS3 without user login

I've been trying to get this to work for a while, but I've apparently missed something.
All I want is to have the latest 3 or so posts from my clients Facebook page to populate and animate in a screensaver that I am building using Flash (AS3).
So far, every time I try to bring anything in, it requires a complete oAuth login and account link, but it's only a one way exchange (read-only, absolutely no writing, posting or even linking, since it's a screensaver) I'm not even sure the client wants pictures or anything.
I am currently trying to use the facebook-actionscript-api, but there isn't an option for the "App Login" type of Authentication that would solve most of my problems.
I'm at wits end and about to have to tell my client it can't be done. At least they'll always have twitter...
I don't think it is possible to get facebook feeds without an accesstoken (even if they are public). So I guess you need to define an app within Facebook and add login stuff to your app so users can give permission to your app for basic access.
Maybe this article offers some help: http://www.adobe.com/devnet/facebook/articles/flex_fbgraph_pt1.html

fb-walls module for drupal

I'm learning my way around drupal a little bit by making someone a site. I'm asked to display facebook wall posts in a block.
I found this module. Now I have no clue how to get started on this.
What I do know is that in drupal>admin>configuration>facebook-wall I need to fill in an application ID of the wall and then the secret code. But I have no clue on how retrieve that. I searched here in SO and using google but all I'm lead to is the facebook developer's pages where it's talking about app creation and developer's stuff I don't understand (eventhough I know a little basic php).
I simply don't know where to start looking, so I guess all i'm asking is for a little more understandable resource to figure this out.
You would want to start here
https://developers.facebook.com/
And since your developing for a website you would want to click the website option, which brings you to here.
https://developers.facebook.com/docs/guides/web/
If you read that page, not even a quarter of the way down, you would see something about Authentication... Which in the first paragraph makes mention of your AppID, and gives you some other links to follow.
https://developers.facebook.com/docs/authentication
Which talks about how the authentication process works, and then there is
https://developers.facebook.com/apps/
Which is used to register you application, which the paragraph it is linked in mentions you need to do in order to use Facebook on your website (which is what your trying to do). Clicking on that link should be pretty self explanatory at that point as to how to get your AppID and Secret.
There you go, I have reduced the amount of reading you now need to do to a level that should be manageable....
Hope this helps.

Twitter + SAOAuthTwitterEngine

So, I have been reading into the whole OAuth stuff the recent days, trying to find something to help me authenticate with twitter. Since most of the topics in this forum pointed to Ben Gottliebs Framework I tried to include it in my TestApp which went fine.
Inserting my tokens, logging in went easy. Next thing I wanted to do, was using my own login screen. So I have to replace the Webview which is used with my own (e.g.) UIView.
The thing is, I couldn't find out how to do that. I have absolutely no idea at what point 'interfere' since everything is so obscure (on purpose?)...
So my questions are:
1) Has anyone approached the issue in any way and can you give me a hint on what there is to do?
2) Is is generally ok to change the framework in that way? I couldn't find anything which would prohibit me of doing that...
The whole idea behind OAuth is that you don't provide the login screen. That way, the user doesn't have to give you his password. Instead, he is taken out of your app temporarily, passed to Twitter (or Facebook, or whatever), authenticated with them, and then Twitter (or Facebook, or whatever) gives you a token that you can use for as long as the user still gives you permission to use it.
That all being said, Twitter does actually provide a way for you to customize your own login screen, called xAuth. However, you need special permission from Twitter to get access to create an xAuth app.
Information about xAuth: http://dev.twitter.com/pages/xauth
Another Question about this: #iPhone : how to create twitter + OAuth custom login in our application

Creating a custom Facebook login form

Does anyone know if it is possible to create our own user interface for Facebook connect instead of having to use FBLoginDialog?
If YES, how?
IF NO, can I format FBLoginDialog to have the look that I want just like the FBStreamDialog (POST message to wall)?
Any suggestion would be highly appreciated.
The FB authorization process is based on OAuth, and the whole idea is that users should never have to give you their user name or password. If you implement your own login interface, that means all information users type in is passed through your code, and that would mean that you break the intention of OAuth, even if you could get it to work (which is not very easy).
An alternative is to modify the appearance of the page by running some Javascript code on the FB web page after it has been loaded from the network. (You'd do that using -[UIWebView stringByEvaluatingJavaScriptFromString]) But even though this is possible, like taskinoor I don't think it's a good idea, because the main thing is that users should feel confident that it the FB page and nothing else that they are typing their info into.
It's in fact not possible for iPhone users to be sure that you haven't faked the whole web view, but at least you shouldn't try to make them suspicious.
I'm not sure whether it can be done or not. But the thing is you most probably should not try to change this. The reason is many user (including me) won't put password if the login page is not from FB. Though I agree that this decision is highly depended on the designer.