facebook-ios-sdk

Migrating existing access tokens to Facebook iOS SDK 3.0

蹲街弑〆低调 提交于 2019-12-22 05:46:06
问题 I just overhauled my codebase to use the new facebook-ios-sdk 3.0 (from the previous version, 2.x or whatnot). Everything worked great, until I realized I hadn't accounted for users who had already granted the app permission/logged in with the previous implementation of the SDK. So I tried checking to see if the accessToken was saved in NSUserDefaults, and if so, make a call to open a session: if ([[NSUserDefaults standardUserDefaults] objectForKey:@"FBAccessTokenKey"] && [[NSUserDefaults

xcode linking issue when using Facebook SDK and Windows Azure SDK

你离开我真会死。 提交于 2019-12-22 05:30:19
问题 I am building an app which uses the latest Facebook SDK (v3.1) and the Windows Azure iOS Toolkit SDK. Now the Azure SDK requires adding the -all_load and -ObjC flags to the "Other Linker Flags" parameter in Build Settings. This is required to fix the known bug when linking against an Objective-C static libraries that contains categories (see http://developer.apple.com/library/mac/#qa/qa1490/_index.html). Without this setting the Azure SDK generates runtime exceptions of "selector not

Facebook SDK 3.1 - Error: HTTP status code: 400

二次信任 提交于 2019-12-22 05:18:13
问题 I am getting the following error ("Error: HTTP status code: 400") now that I have updated to facebook SDK 3.1 as of yesterday, 10/9. But everything is completely functional as far as connecting with facebook, I just see this error message every time I start a facebook session on my app. I have seen a few people commenting on this, but I can't determine from them if this is going to be a real problem or not. Does anyone know definitively if this is going to cause a problem? And if so, how to

FBSDKShareDialog callback for iOS

我的梦境 提交于 2019-12-21 16:51:24
问题 What is the callback method for FBSDKShareDialog when it returns back to your app (after the user has finished creating a post)? This is what I have to create the dialog: -(IBAction)post:(id)sender{ FBSDKShareLinkContent *content = [[FBSDKShareLinkContent alloc] init]; content.contentURL = [NSURL URLWithString:self.spinShareURL]; content.contentDescription=@"#spin"; self.fromFacebook = true; [FBSDKShareDialog showFromViewController:self withContent:content delegate:nil]; } I read somewhere

openActiveSessionWithReadPermissions does not log in automatically

强颜欢笑 提交于 2019-12-21 12:20:08
问题 I have recently started using Facebook SDK 3.1, and am encountering some problems with logging in using openActiveSessionWithReadPermissions . Actually, loggin in works perfectly, if there is a cached token available, it logs in without presenting Facebook UI, and if not, it presents the UI. The problem occurs after I make a call to reauthorizeWithPublishPermissions . If I call reauthorizeWithPublishPermissions , then close and reopen the application, and make a call to

How to implement Logout functionality for Facebook graph API

折月煮酒 提交于 2019-12-21 06:06:08
问题 I implemented Facebook Graph API in my iPhone App and I successfully post it in a wall. But each time I end my application and come back it stores my credentials (in Safari I guess as a cookie). It asks my permission with my previous credentials. But at this point I want my Facebook API should prompt for a new username and password login for requesting permission. In simple I want to logout of my Facebook when i select a button in my App. 回答1: How did you log in to facebook in the first place

how to avoid logging users out when migrating from iOS Facebook 2.x -> 3.x

穿精又带淫゛_ 提交于 2019-12-21 05:22:14
问题 Upgrading our Facebook iOS integration from the 2.x SDK to 3.x SDK automatically logs users out who were previously logged in, since the authentication credentials that we used to have to manually handle ourselves are now handled behind-the-scenes by the new SDK. Is there any way to force the 3.x SDK to authenticate using the access token and expiration date that we were previously manually storing, as a one-time authentication migration? Thanks in advance! 回答1: Finally figured it out. The

FBSessionDelegate methods not firing

Deadly 提交于 2019-12-21 03:12:15
问题 I'm attempting to implement the latest Facebook Connect SDK and I'm having some troubles. For some reason the delegate callbacks for FBSessionDelegate protocol are not being fired. I've followed the instructions on the git Facebook page and tried to mimic the Facebook sample app but no luck. I'm going crazy here so I'm gonna post my code and maybe somebody will see something silly that I've missed. #import <Foundation/Foundation.h> #import "FBConnect.h" @interface FacebookWrapper :

Facebook iOS SDK 3.1: “Error: HTTP status code: 400”

回眸只為那壹抹淺笑 提交于 2019-12-20 10:28:22
问题 I am running the Facebook SDK 3.1 on Xcode 4.5GM with iOS6 simulator. I connect to FB in the iOS settings and successfully FB connect in my app using the new iOS6 FBConnect UI. I have an access token, can see my friends, send app requests, post to my wall, etc. However, every time I initiate any sort of FBURLConnection is made, I see this printed to my console: Error: HTTP status code: 400 I went into the FB code and printed the reponse when this error is printed and I get: { body = { error =

How to invite friends to my application via facebook iOS SDK and Graph API

风格不统一 提交于 2019-12-20 09:51:08
问题 I'm writing an iPhone application. I want to give the user the option to invite friends to start using my application via Facebook. More specifically I want to present a dialog that will let the user to select specific friends to invite. How can I do this? Thanks. 回答1: It's simple you can just write the below code for personalised message and also you can easily select the friend's to whom the request should be sent, it's an straight forward and powerful method. [FBWebDialogs