facebook-ios-sdk

SDK 3.1: How to tell whether SDK is using iOS6 accounts or not?

佐手、 提交于 2020-01-12 07:27:11
问题 If I have a Facebook account set up in iOS6 but the user has switched it off, the SDK just gives me a FBSessionStateClosedLoginFailed status. From that, I can't tell if the user has switched us off in iOS (case 1) or doesn't have an account set up in iOS and declined permission from the FB app or web app (case 2). The error messages I need to present are quite different in the two cases. In the first case, we need to tell the user how to switch us back on, but those instructions would be

Creating an Array of objects from the Facebook SDK in Swift

让人想犯罪 __ 提交于 2020-01-06 13:59:11
问题 Im new to Swift and IOS programming in general so maybe im just google ing the wrong things I have the Facebook SDK working and returning the albums. Now i want the data in objects named Album. These Album objects will be the datasource of my collection view cells When trying to do this i run into the following problem: i can't get my objects into my object array! here is the code i have so far: var i = 0 var list: [String] = [] for rawFeed : AnyObject in data { if rawFeed is FBGraphObject {

Facebook Graph API {user-id}/feed from others empty

╄→гoц情女王★ 提交于 2020-01-06 02:28:09
问题 I want to get /{user-id}/feed from another user (user B) rather than "me" (user A), but the query returns an empty list. I'm using the Graph API Explorer to make the queries, and I've got the Access Token with user_posts , user_status and read_stream permissions, but I can't get this information. In this thread is said that: Additionally the queried user needs to grant the app the read_stream permission. In this other thread they said: If the user is your app user authorized with read_stream

FBSDKGraphRequest use of undeclared identifier

烂漫一生 提交于 2020-01-05 14:12:25
问题 Though I have imported FacebookSDK like: #import <FacebookSDK/FacebookSDK.h> , but it says: use of undeclared identifier 'FBSDKGraphRequest'. The code I wrote is simple: FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc] initWithGraphPath:@"/{user-id}/albums" parameters:params HTTPMethod:@"GET"]; [request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) { // Handle the result }]; Let me know what may I be missing? 回答1: Since version 4.X

Sending Invitation to Facebook Friends with Facebook SDK from IOS App

一曲冷凌霜 提交于 2020-01-04 11:07:04
问题 Here I am trying to invite Facebook friends from my app. I followed this answer It works fine with webDialog .But when I click on send button it gives exception WebKit discarded an uncaught exception in the webView:decidePolicyForNavigationAction:request:frame:decisionListener: delegate: +[NSInvocation _invocationWithMethodSignature:frame:]: method signature argument cannot be nil I am unable to understand whats wrong with my code. Here is my code which i am using -(void)inviteFriends { if ([

Unable to get the email id of the User when Log-in with Facebook SDK in iOS

丶灬走出姿态 提交于 2020-01-03 15:31:23
问题 I am getting [null] value when I am fetching the user's email-id using below code. Also, I already set the permission to access the email like this. { self.fbLoginButton.readPermissions = @[@"public_profile", @"email", @"user_friends"]; } Also Fetching the email details in delegate. - (void)loginButton:(FBSDKLoginButton *)loginButton didCompleteWithResult: (FBSDKLoginManagerLoginResult *)result error: (NSError *)error { if ([FBSDKAccessToken currentAccessToken]) { [[[FBSDKGraphRequest alloc]

'FBSDKLoginKit/FBSDKLoginKit.h' file not found (Facebook SDK for iOS v4.2 & Xcode 7)

爱⌒轻易说出口 提交于 2020-01-03 07:06:08
问题 I follow all the steps in This Tutorial and/or Facebook SDK Documentation to install Facebook Login on my App, but when I run the code I get an error. although Facebook mention I can just use import (Swift) to include the framework, I try to do it the old fashion as well with Objective-C Bridge Header. Error: 'FBSDKLoginKit/FBSDKLoginKit.h' file not found Screenshot As you can see the bridge.h is being read by the compiler, but due to internal file error it will throw error. Bridge.h In Xcode

Facebook SDK 3.0 HelloFacebookSample build errors

十年热恋 提交于 2020-01-03 04:40:15
问题 I'm having trouble compiling the HelloFacebookSample app that comes with Facebook SDK 3.0. Firstly, I should say I'm using Xcode 4.0.2, iOS SDK 4.3 and OS X 10.6.8. (I'm struggling to find a way to download Xcode 4.2 without upgrading to Lion or Mountain Lion, which I'm reluctant to do.) When I try to build the sample project, I get the following build errors: 1) Unexpected '@' in program int main(int argc, char *argv[]) { @autoreleasepool { // error on this line return UIApplicationMain(argc

FB iOS SDK Custom Token Caching issue

懵懂的女人 提交于 2020-01-03 04:12:05
问题 I am trying to build an iOS application with a custom token caching mechanism. I authenticate to FB on the device and I store the FB access token on my server against a session token on my server and then make FB API requests from the server. The FB Login works fine. I am able to cache the token onto my server. But the real problem happens when I run the app the next time after I logged into FB. This is the flow I follow to check if my app is logged into FB. 1) Hit a url on my server to get

Can I use Facebook auth server side flow on an iPhone app and still have client side interactions?

笑着哭i 提交于 2020-01-01 12:00:10
问题 I have a website that uses Facebook authentication for logging in users. It uses the oAuth 2.0 server side flow for authentication and it all works fine. I am now developing an iPhone application for the same website and want to allow users to sign in to the website via the iPhone application using FB authentication.The Facebook iOS SDK provides mechanisms to do the authentication using the client side flow, where in my iPhone app gets the access token. Now to authenticate the user with my