display facebook page dialog with ios sdk - facebook

I'm working with ios, and I'm trying to show a facebook page to let user like it.
There is a dialog method in facebook ios sdk
[facebook dialog: andDelegate:]
But i can't use this method, because there are "feed","oauth" methods only.
Is there any function to show facebook page with a dialog?
I guess there isn't.
So the second try is this : Sign in with Webview, and show user the page.
This has a problem too. i can't sign in facebook via webview with user's access token.
i've done signin with "[facebook authorize:fbPermissions]" method, but this never share the cookie with my UIWebView.
Can I sign in facebook via webview, with user's access token?
And more try, I thought like this.
If i sign in with UIWebView first, and save access token in my server and my iphone, I could use this for ios sdk.
Is this possible?
Please help me. I didn't sleep for a long time.
Thanks.

Related

facebook sdk once-only login webapp

Hi I have a question for the facebook javascript sdk. Is it possible, and if yes how, that the user login only one time and then the user is always logged in instead of every application start go on the login button again? I try to make a webapp and run it with webview in android. Any apps have that function e.g. draw something.
That´s what FB.getLoginStatus is for, it checks if the user authorized your App already and refreshes the Token: https://developers.facebook.com/docs/reference/javascript/FB.getLoginStatus/
More information: http://www.devils-heaven.com/facebook-javascript-sdk-login/

Facebook Integration in IOS

i am using FBConnect in my project for integration of Facebook.but now i saw in all apps,when the user tap the Facebook button,it goes directly to the FaceBook App in the device to open for login.i think this is done with URLschema to communicate the App to App in a device.but how can we o this in case of Facebook.
My need is ,i have a sharing option in my app to Facebook,so when the user tap the button it needs to open the Facebook app in the device for login,and after successful login it needs to come back to my app also.how to o this?.is there any sample project or apps to do this.
Thanks in advance.
Look for the FBSessionDelegate. You provide the delegate which gets callbacks when the FB login completes (successfully or not). Also the FBConnect code, see git://github.com/facebook/facebook-ios-sdk.git, has a sample directory with a Hackbook Xcode project. That should get you started!
Here is the Facebook iOS Tutorial (which uses FBConnect).
You can use the Graph API(Uses OAuth 201 authentication protocol) instead of FBConnect , which is newer and a lot easier.You can implement it inthe following steps:-
1>Get unique id and api key from facebook's develooper portal.
2>Display the login page of the facebook in your app.
3>Allow the user to loginthrough following URL
https://graph.facebook.com/oauth/authorize?
client_id=[API key]&
redirect_uri=http://www.facebook.com/connect/login_success.html&
scope=[extended permissions]&
type=user_agent&
display=touch
you can implement the FBLoginView in UIWebView and present it.The code is be large so i am giving a link to Ray Wendelich's Facebook Graph API

Utilize the Facebook SDK Login (iOs/Android) for being logged into Facebook # Web?

Straight Forward:
User logs into my iPhone/Android App with Facebook SDK [so i got an id and authtoken for that user]
... functionality using the FB SDK and much more ...
I open a WebView inside my pp and load the facebook profile of an other user, but in this webview im NOT logged in.
Is there a possibility, to utilize my login (id/authtoken) from the SDK to get the user automatically logged in inside the webview?
TIA
On iOS you can use single sign on, see https://github.com/facebook/facebook-ios-sdk, scroll down to 'Single Sign On' section with it's description.
This is not a direct solution but perhaps it could help.

Seamless facebook login experience for iOS using Custom URL Scheme

How can one login to Facebook from an app using the Custom URL scheme?
Some apps like AppsFire does it. Instead of integrating FB-Connect within the app, they launch facebook app and login there. Once logged in, your app gets a call back.
Is anyone aware of the "private" custom URL scheme for this?
This doesn't help much...
http://iphonedevtools.com/?p=302
Answering my own question...
https://github.com/facebook/facebook-ios-sdk

Facebook Authentication - issue coming back into my iPhone app via custom url scheme

I am trying to use the new Facebook 'one-time authentication' process in my iPhone app.
The idea is that the app links out to either the Facebook app or Safari to ask the user to log in to Facebook, then Facebook returns the user to the app using a custom URL scheme.
I have set up the custom url scheme in the app, prepending 'fb' as instructed by Facebook (e.g. 'fbmyapp'). This works when typing 'fbmyapp://' into Safari - i.e. my app gets launched. This confirms that the custom URL scheme works.
I can successfully get the user to the log in page in both Safari and the Facebook app using the following call in the app:
facebook = [[Facebook alloc] init];
[facebook authorize:appId permissions:permissions delegate:self];
I have enable multi-tasking in the app (allowing the app to run in the background).
HOWEVER, upon successful login Facebook should redirect back to my app, but I get, from Safari for example: "Cannot Open Page - Safari cannot open the page because the address is invalid". I get a similar message in the Facebook app.
Any help would be greatly appreciated.
Thanks in advance.
I think that you have have the url schema wrong. You need to append your facebook app ID to fb in your app and not fb-myapp.
Hope that helps.