Adding a Facebook like button to our App - ios

In my app I am allowing users to post to Facebook via the iOS API as follows:
SLComposeViewController * controllerSLC = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeFacebook];
I would like to add a Facebook 'Like' button for users who want to like our App. I have a couple questions:
1) Can a Facebook Like be accomplished using the Native iOS SDK? I could not find any reference so my assumption is no, but I was hoping for some clarification.
2) If I want a user to like our app on our Facebook home page, I believe the user has to be logged in to their account. SO, if the user is signed into Facebook on their device can I integrate the Facebook API's to that so the user does not have to log in again? I cannot find any solid iOS example of adding a like button to my app.
Thanks for any guidance.

There is a native like button under testing and you can find the documentation about it at https://developers.facebook.com/docs/ios/like-button . But be aware that only people will have a role on the app will see it so you can't currently use it.
If you are showing a webview the user will not be logged in in that webview even if they are logged in in the Facebook app. Same thing with redirecting to the browser. If the user is logged in in the Facebook app doesn't mean they will be logged in in the browser.

Related

IOS app that displays a Facebook group

I would like to know what is the best way to show a Facebook group in an iOS app.
I have a iOS app that uses Facebook logins for the users to access content. I thought I might be able to display the a Facebook group using a UIWebView. The problem is when the Facebook group webpage the opened, the user is presented with a login. As the user has already logged into my app using Facebook, I am wondering if its possible to use the current access token to inform Facebook that the user is already logged in.
If that doesn't work, how else could I add a Facebook Group to a iOS app? Is there a sample app somewhere that displays Facebook page is a UIViewController?
Thanks
To the best of my knowledge, if you want to show FB content in a UIWebView, the user must perform the login inside the UIWebView. You cannot share your access token with the web-view.
A possible solution would be to use the graph API (you're already using the FB iOS SDK, right?) to retrieve the group info, feed etc. and show it to your users. The downside is that you'll have to create and display the group info yourself with your own design.
You can take a look at the FB graph API for groups here.

How to Redirect Facebook Request to iTunes?

There are a few things i need to know, so please let me first explain my senario. In our iOS game what we need to do is when the user presses the Facebook button the game should open the Facebook and ask for login and then the user will authenticate the app. Rite after that the user will be shown his Friends from which he will pick up anyone he wants and sends the request (This is the only thing the game needs to do, our game will not receive any requests from Facebook). Now, the friend who gets the request when logs into Facebook (not from game, general login from safari or fb App for iOS) and clicks it, he will sent to the iTunes page to download our game.
Questions:
1) The App is not in the sandbox mode and there are only 2 admins and we are not getting each other requests. We are using Prime 31 social networking plugin which logins the and shows the friends correctly.
So, looking at this conversation
Linking Facebook app link to iTunes download page
do I need to create a page for my app so that I could send requests and redirect the user to our iTunes game download page?
2) Is there any tutorial or guide lines available to do this or even possible? :(
Regards,
Abe
First you need to create facebook app and link dat app to your ios app as follows,
https://developers.facebook.com/docs/ios/getting-started/
After that try out the sample projects given with facebook sdk.

Invite user to install an iOS App using Facebook

I have an iOS social app, which used Facebook to login. Now I have access to the friends list. Is there a way to send a request to a Facebook friend (who is currently not using app) to install my App. What I mean to say how can you advertise an app using Facebook circle.
You can use FBWebDialogs, there's a presentRequestsDialogModallyWithSession method which does what you need.
You can also see this tutorial - https://developers.facebook.com/docs/ios/send-requests-using-ios-sdk/

Not automatically login to Google+ using UIWebView (iOS)?

I have a question about authentication with UIWebView.
I want to login in webview in plus.google.co
I sign in in google plus one time as shown in
https://developers.google.com/+/mobile/ios/sign-in
When user go to google+ page again in UIWebView then program should be automatically
logged in and save the user's session. But in fact it is not keep logged in.How can i keep user logged in for google+ although user is one time sign in for Google+ in my application.
I also checked condition for this as :[[GPPSignIn sharedInstance]
authentication] and it return true that i am logged in already.but when i checked in uiwebview by pushing new ViewController then it ask me to sign in.
And When i open plus.google.com in safari in iPhone then it show me
as a login user.
I searched a lot but can not find an answer.please help me out from
this.
If I understand your question correctly you have implemented sign in with the iOS SDK, but you would like to enable sign in for your mobile web browser following these instructions:
https://developers.google.com/+/mobile/ios/sign-in
These are for a native iOS application. To implement sign in for mobile web you should follow the instructions for sign in on the web:
https://developers.google.com/+/web/signin/
Sorry if this doesn't answer your question directly, but if it doesn't please give more details about your problem.
Sign In with Google is now supported through the new Google Sign In iOS SDK. Migration instructions for users of the Google+ Sign In SDK are available here.

keep Facebook authentication when accessing webpage thru UIWebView after login with iOS SDK

I have successfully integrated the facebook ios SDK in my app so that user can post to their wall through a feed dialog.
However, I would like to post an open graph object through my app but since this is currently only supported on webpages (is this correct?), I suppose I can load the webpage with the meta tags inside a UIWebView. If I do so, however, I believe user have to authenticate my web app as well?
Is there a way to not need the user to authenticate my web app inside the UIWebView when they have already login through the iOS SDK? I would like to keep the iOS SDK login process because it doesn't require user to enter their facebook details (assuming they have the facebook app installed of coz)
thanks much in advance!
it looks like i am able to post feeds in UIWebView after logging in with the iOS SDK. I did logout of facebook on my safari app just in case....

Resources