how can I sign in from my iphone app to facebook account? - iphone

I want to sign in to facebook using my application, so how do I code it?

Facebook provide an iOS SDK that gives you the ability to sign into Facebook and methods for accessing the GraphAPI.
Check here for information - http://developers.facebook.com/blog/post/400

Facebook iOS SDK is available here.
You will have to
Download the SDK, and install it
Create a Facebook App in your Facebook developer console, and get a
Facebook app id.
In your Xcode project add the Facebook SDK framework files.
Add the Facebook app id in your projects Info.plist file, and start
coding.
You could get more information here.
Edit : From iOS6 onwards, Apple has a new framework to post into Facebook. It is called Social Framework, and you could find information about it here.

Related

Registering facebook app without including sdk

Since iOS has built in Facebook sharing (via UIActivityViewController), I'm easily able to post without including the FB SDK. However, when I post to my timeline, I want it to say "via AppName". Do I have to add the sdk to my app or is there a simpler way of doing this?
No, you will have to create a Facebook App and use the iOS SDK.

Facebook share kit ios

I have implemented Facebook share kit to my app and it works as intended, but if the user installed Facebook official iPhone app it messes up my app because it logins through Facebook iPhone app instead of share kit default login. Is there way to make share kit ignore Facebook official iPhone app?
No, there is no such method. You just have to use the latest Facebook API provided by the Apple. That may solve your problem of not detecting the login from app.

How to authenticate a person who has facebook but not the facebook app on iOS device?

I am creating an app on iOS and i came across a scenario if a person does not have the facebook app installed but has Facebook. how does the game app handle that. you can only play the game if and only if you have facebook account?
You can use Single Sign On in Facebook.
So that the facebook will authenticate its user through facebook app if its installed otherwise through the safari.
Here is the Link also here.
Happy coding :)
If you targeted the older versions (below ios6) use Graph API.
If you targeted for newer version (ios 6 and above) use the native method

facebook app doesn't auth for my app

I have a problem to connect facebook app with my app.
I don't know much about facebook sdk, so I simply copy & paste from the facebook sample app.
(i only need upload image with some text).
it works well unless facebook app is installed on the device, but if a device has facebook app, it seems like can't get the login information.
I think it is because of facebook app doesn't ask auth for my app unlike safari browser.
What do I have to do?
Please Download the latest version of Facebook app (4.1.1) from app store. The Single Sign On(SSO) only supports in the latest version of Facebook application.

facebook authorization dialog style

in Facebook official website, iphone authorization dialog is
while when I work follow its steps(iOS for iPhone/iPad): http://developers.facebook.com/docs/guides/mobile/
I got the authorization dialog as follows which is the same as Mobile Web.
Who can tell me why?
How can I get authorization dialog as the iphone one in Facebook official website?
On the latest versions of iOS on the device and if Facebook app is installed on the device there will be login dialog. If Facebook app is not installed, then it will open Safari to obtain the access token. This is by design of Facebook iOS SDK. You can patch the SDK if you don't want Safari in in any case.
see authorizeWithFBAppAuth method in Facebook.m
hope this helps