facebook-ios-sdk

Facebook iOS 3.1 SDK: can login with Safari but not natively

匆匆过客 提交于 2019-12-01 18:17:28
I'm integrating the iOS 3.1 Facebook SDK. When implementing a login with Facebook feature, I call FBSession openActiveSessionWithReadPermissions:allowLoginUI:completionHandler: . When called on the simulator (where I don't have a FB account set up natively) I can successfully login. However, from a device with a native Facebook account setup, when calling openActiveSessionWithReadPermissions... the session type returned in the completion handler is always sessionStateClosedLoginFailed , regardless of whether I allow or disallow my app to use Facebook in the alert dialog. The session state

Request ID is not available when App Launches after clicking Facebook notification

左心房为你撑大大i 提交于 2019-12-01 13:28:44
A Facebook app is setup with iOS native app enabled with bundle id and App Store Id of another app. Following are possible in the current scenario. 1.Sending an app request to a friend, 2.The request badge appears in the friend's Facebook, 3. And clicking on the request launches my app. This was the link i referred to implement this. https://developers.facebook.com/docs/howtos/send-requests-using-ios-sdk/#protip3 I am supposed to get a NSURL from these functions – application:openURL:sourceApplication:annotation: OR – application:handleOpenURL: and the expected format is as follows. fb[APP_ID]

Using Facebook Graph API on iOS

半城伤御伤魂 提交于 2019-12-01 08:28:56
This is my first post on StackOverflow but i use this for a long time... My problem is basically simple, I want to share the content of a UITextView(mShareText) on the user's wall without prompting any Dialog. Basically, the user has to fill its message on the UITextView and then click on a " post " UIButton. Simple isn't it ? I've downloaded the Facebook iOS SDK and copied it into my project. I've included " FBConnect.h " and " Facebook.h " on my controller's header file and created a var : Facebook* facebook ;, the controller also implements the following delegates : FBSessionDelegate,

Using Facebook Graph API on iOS

时光怂恿深爱的人放手 提交于 2019-12-01 06:54:15
问题 This is my first post on StackOverflow but i use this for a long time... My problem is basically simple, I want to share the content of a UITextView(mShareText) on the user's wall without prompting any Dialog. Basically, the user has to fill its message on the UITextView and then click on a " post " UIButton. Simple isn't it ? I've downloaded the Facebook iOS SDK and copied it into my project. I've included " FBConnect.h " and " Facebook.h " on my controller's header file and created a var :

Type 'Any?' has no subscript members [duplicate]

左心房为你撑大大i 提交于 2019-12-01 06:39:00
问题 This question already has answers here : Type 'Any' has no subscript members (firebase) (2 answers) Closed 2 years ago . I am trying to retrieve email id after fb login in my app. However I am getting an error when i try to get the value from result. The error is: Type 'Any?' has no subscript members . func fetchProfile() { print("Fetch Profile") let parameters = ["fields": "email, first_name, last_name, picture.type(large)"] FBSDKGraphRequest(graphPath: "me", parameters: parameters).start {

Facebook App Invites iOS v4 SDK error

孤者浪人 提交于 2019-12-01 06:25:08
I've double checked everything, from my understanding this is all I need to do: self.inviteContent = [[FBSDKAppInviteContent alloc] initWithAppLinkURL:[NSURL URLWithString:@"http://mywebsite.com"]]; [FBSDKAppInviteDialog showWithContent:self.inviteContent delegate:self]; On mywebsite.com I have this in the heading (example values shown here): <html> <head> <title>My Website</title> <meta property="al:ios:url" content="appurl://action"> <meta property="al:ios:app_store_id" content="1234567"> <meta property="al:ios:app_name" content="My App"> </head> <body> ... </body> </html> So the dialog

Facebook SDK 3.1 presentShareDialogModally fails

江枫思渺然 提交于 2019-12-01 05:21:05
问题 I'm trying to test out the new built-in share "sheet" for Facebook on iOS 6 but when I run the sample code it doesn't show the sheet. Instead it posts a status for me without showing what it's going to post first. Also I thought Facebook didn't allow you to put words in the user's mouth anymore? The console prints this error: HelloFacebookSample Error: HTTP status code: 400 I have XCode 4.5 and iOS simulator 6.0 and Facebook SDK 3.1 I'm following this: http://developers.facebook.com/docs

Facebook iOS SDK 3.0 - save and reload .selection in FBFriendPickerViewController

筅森魡賤 提交于 2019-12-01 04:24:19
问题 FBFriendPickerViewController seems pretty straightforward. However, it may not be designed for the scenario I want. Essentially, I want to save a list of friends the user selects to disk. On subsequent app launches, I want to show the FBFriendPickerViewController with these "saved" friends as being already selected. Since the .selection attribute is readonly, I'm not sure how I can load a new instance of FBFriendPickerViewController with a subset of friends already "selected". 回答1: Finally I

How to react to asynchronous events (login)?

最后都变了- 提交于 2019-12-01 01:43:32
I am implementing some Facebook functionality in my iPhone app right now which needs an app login. The login itself isn't a problem any more, it's working. But due to the fact that the Facebook SDK works with events, I don't know how to perform my action as a reaction to a successful login. For example: I have a method - (void)refreshEvents; This method needs to call the login method to make sure that the action can actually be performed. So I call [self checkLogin] - but what now? How can I wait for an event that's not really bound to my method? As checkLogin triggers asynchronous actions

ios Facebook SDK v4.x access token null despite being logged in via FBSDKLoginButton

萝らか妹 提交于 2019-11-30 18:19:55
My facebook access token is null despite the fact that the button shows that I'm logged in. Anyone know why this would be? From RootViewController.m - (void)viewDidLoad { [super viewDidLoad]; self->login_button = [[FBSDKLoginButton alloc] init]; self->login_button.center = self.view.center; [self.view addSubview:self->login_button]; FBSDKAccessToken* access_token =[FBSDKAccessToken currentAccessToken]; NSLog(@"Access Token, %@",access_token); } From ApplicationDelegate.m - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window =