Creating a custom Facebook login form - iphone

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.

Related

Integrating PunBB login system with the rest of my site

First off, I am presuming this is possible please correct me if I am wrong.
I have a simple login / registration system on my site now, however decided to delete this when installing PunBB discussion board. I prefer PunBB's login to my own so I was wondering whether it is possible to make login to the site only achievable through PunBB. Is their an extension for this? Or do you know of any useful sources that will help me implement this? Thank you in advance.
Undoubtedly, PunBB uses some kind of cookie or hash to determine if a user is logged in or not. Simply use that cookie or hash in your own pages to determine who is logged in when you're not on a PunBB page.
There's probably an include file you can use for that purpose.
Please see this page for information on implementing PunBB functionality into other parts of your website and details of the database schema.

Store data of people who clicked on a button on Facebook

I would really appreciate some help with the Facebook application I currently work on.
I developing a simple Facebook application, and I need to store the data of the people, who click the "I want to win button". I'm not sure if I should use plain, old vanilla PHP, or if the Facebook API provides some simple way to do that, so I would be really glad for some ideas about this.
I read about the topic, but I can't really "see the Matrix" yet, so every answer is appriciated. Also I'm more interested in ideas and not the implementation, as I'm fairly confident in my programming skills.
Thank you everybody!
Richard
You will definitely need to use an external db, coz facebook will not store the data for you. However facebook does store the connection that a user makes with the app, i.e. when a user gives some(even basic) permissions to your app. Hence when an old user comes to your app you can know which, and if it is an old user.
Facebook sends your entry script a signed_request, which contains data about the user visiting your app, this request will have a user_id field only if the user has made the connection/authorized your app, hence you know if it's an old user or new.
Once you have the user_id you can call the graph api to get info about the user. In the php SDK you can easily call $facebookObject->api('/me','GET'); to get user info.
You can easily call the functions anytime, so if you want to make a call when a user clicks your button, you can do that.
Check out the links i have included, thoroughly, you'll get the idea.

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

How implement Facebook-Login / facilitate site-register using 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.)

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