ios,facebook,facebook-graph-api,facebook-like,facebook-ios-sdk
Got Response from Facebook Team : Since Graph API v2.0, all requests to the API require an access token. You can proxy this request through a web-server and use your app access token for example. You could as well make the request from your app by shipping your app access...
This is because Facebook removed or forgot to add FBSDKTestUsersManager.h file in to FBSDKCoreKit.h file. so just do one thing add this line in FBSDKCoreKit.h. #import <FBSDKCoreKit/FBSDKTestUsersManager.h> it will resolve your problem....
ios,facebook,uinavigationbar,facebook-ios-sdk
The FBFriendPickerViewController uses a UINavigationController. You have two options: Present the FBFriendPickerViewController, instead of pushing it into the navigation stack, like this: [self presentViewController:self.friendPickerController animated:YES completion:nil]; I found another post on SE where someone solved the problem by hiding the buttons within the 'FBFriendPickerViewController' navigation controller before pushing it. Hide...
ios,facebook-like,facebook-ios-sdk
It appears that you have to get the Native Like Button reviewed by Facebook before it becomes production-ready. The documentation for the Native Like button describes the penalty for non-reviewed apps as a "Beta" banner appearing on the Like page, and does not mention that it simply doesn't work, but...
ios,facebook,swift,parse.com,facebook-ios-sdk
You can replace the Facebook SDK with the latest Facebook SDK 4.x and try the following code. FBSDKAppInviteContent *content =[[FBSDKAppInviteContent alloc] init]; content.appLinkURL = [NSURL URLWithString:@"https://fb.me/appId"]; //optionally set previewImageURL content.previewImageURL = [NSURL URLWithString:@"http://exampleurl.jpg"]; // present the dialog. Assumes self implements protocol `FBSDKAppInviteDialogDelegate` [FBSDKAppInviteDialog showWithContent:content delegate:nil]; For more detail please have...
In both v3 and v4 of the SDK, the access token is cached locally on the device (by default), and the only way to know if it's still "valid" is to make a graph request. You can make a /me or /permissions request during app start if you have a...
ios,swift,uiimageview,facebook-ios-sdk
The problem is that FBProfilePictureView contains a UIImageView and does not expose it for you to modify it's properties. It downloads a square image if pictureCropping == FBProfilePictureCroppingSquare otherwise it downloads a small, medium or large image depending on the width of the frame. But there is no way to...
ios,facebook-graph-api,facebook-ios-sdk
User ids for users that logged into an app at least once using API v1 already will not change, your app will still receive the global user id for those; only for users that login using v2 for the first time (that is, have not used it before already), an...
ios,facebook,facebook-login,facebook-ios-sdk,url-scheme
Got it solved. As it turns out, I can only define one FB URL Scheme per scheme. I also forgot to define FacebookURLSchemeSuffix. So, what I did is, I use user-defined setting to alternate between staging and production build. Here's how I did it. Go to Targets > Build Setttings...
facebook,facebook-javascript-sdk,facebook-ios-sdk,facebook-android-sdk
From https://developers.facebook.com/bugs/660270670746239/ it is by design and it does not seems like they will change it but I'm requesting.
facebook,facebook-graph-api,facebook-opengraph,facebook-ios-sdk
I work closely with the people who review the apps and we do have Facebook app on our simulators. So don't worry for that. Please provide complete steps for the team to review your app's functionality. Thanks!
facebook,facebook-graph-api,facebook-ios-sdk,facebook-graph-api-v2.0
In v2.0 of the Graph API, calling /me/friends returns the person's friends who also use the app. In addition, in v2.0, you must request the user_friends permission from each user. user_friends is no longer included by default in every login. Each user must grant the user_friends permission in order to...
ios,objective-c,facebook,facebook-graph-api,facebook-ios-sdk
Since graph API v2.0, this is no longer possible: See https://developers.facebook.com/docs/graph-api/reference/v2.2/user/friends#readperms This will only return any friends who have used (via Facebook Login) the app making the request. https://developers.facebook.com/docs/apps/upgrading#upgrading_v2_0_user_ids In v2.0, the friends API endpoint returns the list of a person's friends who are also using your app. In v1.0,...
facebook-ios-sdk,amazon-cognito
I've got the answer from AWS forum: var logins: NSDictionary = NSDictionary(dictionary: ["graph.facebook.com" : token]) ...
ios,objective-c,swift,cocoapods,facebook-ios-sdk
Changing the pod link to pod "Facebook-iOS-SDK" solved it why do they put \' in documentation is the question now?...
ios,facebook,swift,facebook-ios-sdk
The issue is with NSDictionary. The following is working for me: func appInviteDialog(appInviteDialog: FBSDKAppInviteDialog!, didCompleteWithResults results: [NSObject : AnyObject]!) { println("Complete invite without error") } func appInviteDialog(appInviteDialog: FBSDKAppInviteDialog!, didFailWithError error: NSError!) { println("Error in invite \(error)") } ...
ios,objective-c,facebook,facebook-graph-api,facebook-ios-sdk
You can make use of the since parameter as described in https://developers.facebook.com/docs/graph-api/reference/v2.2/user/events/#read https://developers.facebook.com/docs/graph-api/using-graph-api#paging if you set the timestamp to the current time, you should only see future events: /me/events?since=1417508443 ...
ios,iphone,facebook,facebook-login,facebook-ios-sdk
Check the pageLike controller and remove all the fb login view controller as they might be creating issues .
ios,objective-c,facebook-graph-api,facebook-ios-sdk
Configure the plist from the guide facebook has here https://developers.facebook.com/docs/ios/getting-started/ It should work if you have the plist and an app on the facebook developer profile with iOS enabled ...
ios,objective-c,facebook-ios-sdk,facebook-sdk-3.14.x
I found the solution myself. I should have used UIView instead of ImageView Regards,...
ios,facebook-graph-api,facebook-ios-sdk
You can specify a width= or height= parameter instead of type if you want more control over the size you get back. I can't find it currently documented but in my code I noted that type=large means about 200px wide.
ios,iphone,objective-c,facebook,facebook-ios-sdk
Use following method : -(void)openFacebookAuthentication { NSArray *permission = [NSArray arrayWithObjects:kFBEmailPermission,kFBUserPhotosPermission, nil]; FBSession *session = [[FBSession alloc] initWithPermissions:permission]; [FBSession setActiveSession: [[FBSession alloc] initWithPermissions:permission] ]; [[FBSession activeSession] openWithBehavior:FBSessionLoginBehaviorForcingWebView completionHandler:^(FBSession *session, FBSessionState status, NSError *error) { switch (status) { case FBSessionStateOpen: [self getMyData];...
ios,objective-c,facebook,facebook-opengraph,facebook-ios-sdk
OK, I figured it out myself - like many other developers. 1 - This error is due to the fact that FB app isn't approved for certain permissions but still trying to use / request that permission from user. publish_action is one such permission. 2 - In order to test...
facebook-ios-sdk,facebook-unity-sdk
It was fixed in Facebook sdk 6.2(now in beta).
To get the user details you have to send a FBSDKGraphRequest after the login request. This can be done inside the if let user = user {...} block. // Create request for user's Facebook data let request = FBSDKGraphRequest(graphPath:"me", parameters:nil) // Send request to Facebook request.startWithCompletionHandler { (connection, result, error)...
ios,facebook,facebook-login,facebook-ios-sdk
Singelton design is a good approach. For for a login use case, you really need not have to have a singelton. You can still go with Observer design pattern. Singleton is really nice while using CoreData or persistent storage or many operations that needs a common unique controller across the...
ios,swift,parse.com,facebook-ios-sdk,logout
I just implemented this. Call this function from any viewController in the application and it will logout from facebook. Worked like a charm for me. I hope it helps you. -(void) logout { FBSDKLoginManager *login = [[FBSDKLoginManager alloc] init]; if ( [FBSDKAccessToken currentAccessToken] ){ [login logOut]; } } ...
ios,facebook,facebook-ios-sdk,facebook-app-settings
If you don't have an app store ID, use 0 for now to create your app. Later you can add it in the App Dashboard.
ios,facebook,facebook-graph-api,facebook-ios-sdk
Most probably you are not getting the permission for you app to read the wall. If you are creating the login control programmatically, FBLoginView *loginView = [[FBLoginView alloc] initWithReadPermissions: @[@"public_profile", @"read_stream"]]; if you're using the FBLoginView through Interface Builder you can set the read permissions through the readPermissions property of...
objective-c,facebook-graph-api,swift,facebook-ios-sdk
Here: @IBAction func requestUserInfo(sender: AnyObject){ // These are the permissions we need: var permissionsNeeded = ["public_profile", "user_birthday", "email"] // Request the permissions the user currently has FBRequestConnection.startWithGraphPath("/me/permissions", completionHandler: {(connection, result, error) -> Void in if error == nil{ // Parse the list of existing permissions and extract them for easier...
Yes, FBSDKAccessToken.currentAccessToken() is what you should be checking although the code you have won't work as this does not return a Boolean. You'll need something like: if(FBSDKAccessToken.currentAccessToken() != nil) { //They are logged in so show another view } else { //They need to log in } Also, this alone...
Finally found the solution. Since I was upgrading from an older Facebook SDK, I had to delete the older FacebookSDK.framework file from $(PROJECT_DIR)/Frameworks and then re-add it in XCode....
ios,objective-c,swift,facebook-ios-sdk
Every dictionary lookup in Swift returns an optional that must be unwrapped. In addition, you might have to use conditional casts as? to tell Swift what type to expect. You might be able to chain multiple dictionary accesses together by using optional chaining following each dictionary lookup with ?. Try...
ios,facebook,swift,game-center,facebook-ios-sdk
Are your settings in Settings | Facebook current so that you are authenticated? FWIK that should be all there is to it.
You can authorize users with user_friends, use /me/friends to get all the friends who authorized the App too and then send a message to all the friends in the list if the user is new.
ios,objective-c,facebook-graph-api,facebook-ios-sdk
The profile picture is in fact public and you can simply by adding the user id to Facebook's designated profile picture url address, ex: var userID = user["id"] as NSString var facebookProfileUrl = "http://graph.facebook.com/\(userID)/picture?type=large" This particular url address should return the "large" version of the user's profile picture, but several...
ios,objective-c,facebook,facebook-graph-api,facebook-ios-sdk
If you read the documentation- picture: The URL of a picture attached to this post. The picture must be at least 200px by 200px. So, you cannot pass the image data to the feed- only a link to that picture will work. To solve this, you just have 2 options-...
ios,objective-c,facebook-like,facebook-ios-sdk
As commented by @MingLi, FBLikeControl will only open the Facebook app if supported version is available on device.
ios,objective-c,facebook,facebook-graph-api,facebook-ios-sdk
There's no support for captions via the photo share dialog. The user must type in the caption/message themselves.
You can´t get ALL friends anymore, only those who authorized your App too. You can´t post on the wall of friends. That possibility was removed many years ago because it would always be spam. Check out the changelog: https://developers.facebook.com/docs/apps/changelog?locale=en_GB...
ios,facebook-graph-api,facebook-ios-sdk
The "friends" and "place" parameters are ignored by Messenger since those are specific for tagging, and Messenger doesn't support tagging. You cannot specify users to preselect using the message dialog. We will update the docs to reflect this in the future....
ios,objective-c,facebook,facebook-graph-api,facebook-ios-sdk
user_events needs to get approved by Facebook before it works with any user, else it will only work for users with a role in your app: https://developers.facebook.com/docs/apps/review/login
ios,facebook,permissions,facebook-apps,facebook-ios-sdk
It looks like facebook intended this behavior after their latest SDK release. Here I've found the related facebook bug report and they have closed it as "By Design". According to a member of the Facebook Platform Team : This is by design. The confirmation dialog does not serve the app...
ios,facebook-graph-api,facebook-like,facebook-ios-sdk
If you're using FBLikeControlObjectTypePage, then the objectID should be either a page id, or a url to a Facebook Page. For example: like.objectID = @"https://www.facebook.com/facebook"; or like.objectID = @"20531316728"; ...
ios,facebook-graph-api,facebook-ios-sdk,applinks
app_link_hosts should only be called from the server-side (or done manually via curl), it should not be done from a mobile device as it requires your app secret. We will update the docs to remove the iOS and Android code blocks. See this doc for more info on the curl...
ios,facebook-ios-sdk,photo-gallery
Facebook iOS SDK isn't providing such thing for now. Instead I found a third party class which does exactly same thing. https://github.com/OceanLabs/FacebookImagePicker-iOS/
swift,parse.com,facebook-ios-sdk
I had this error once and had to put this line before the login call in Objective-C [FBSession.activeSession closeAndClearTokenInformation]; I can't seem to find the swift equivalent in the Parse SDK, and the Facebook SDK is still only in Objective-C. You may have to add this line to an Objective-C...
ios,swift,facebook-graph-api,facebook-ios-sdk
Get user info in facebook sdk 4.x swift @IBAction func btnFBLoginPressed(sender: AnyObject) { var fbLoginManager : FBSDKLoginManager = FBSDKLoginManager() fbLoginManager .logInWithReadPermissions(["email"], handler: { (result, error) -> Void in if (error == nil){ var fbloginresult : FBSDKLoginManagerLoginResult = result if(fbloginresult.grantedPermissions.containsObject("email")) { self.getFBUserData() fbLoginManager.logOut() } } }) } func getFBUserData(){ if((FBSDKAccessToken.currentAccessToken()) !=...
I found the solution at the following page: http://jitu1990.blogspot.com/2015/05/share-with-facebook-from-ios-app.html Here is my final code: -(IBAction)post:(id)sender{ FBSDKShareLinkContent *content = [[FBSDKShareLinkContent alloc] init]; content.contentURL = [NSURL URLWithString:self.spinShareURL]; content.contentTitle= [NSString stringWithFormat: @"%@'s spin", self.username]; [email protected]"#spin"; self.fromFacebook = true; [FBSDKShareDialog showFromViewController:self withContent:content delegate:self]; }-...
ios,facebook,facebook-ios-sdk,facebook-permissions
Looks like this worked: - (BOOL)hasWritePermissions { if (!FBSession.activeSession.isOpen) return NO; return [FBSession.activeSession.permissions indexOfObject:@[@"publish_actions"]] != NSNotFound; } - (void)requestWritePermissions:(void(^)(BOOL status, NSError *error))callback { if (self.hasWritePermissions) { callback(YES, nil); return; } if (FBSession.activeSession.isOpen) { [FBSession.activeSession requestNewPublishPermissions:@[@"publish_actions"] defaultAudience:FBSessionDefaultAudienceFriends completionHandler:^(FBSession...
It means that you need request for publish_actions permission before upload. See Facebook Login for iOS, search for Checking for permissions.
ios,objective-c,facebook-ios-sdk
Since version 4.X Facebook has split the SDK in 3 parts: Per documentation: The SDK is now composed of three frameworks, FBSDKCoreKit, FBSDKLoginKit, and FBSDKShareKit. FBSDKCoreKit provides core SDK functionality such as Graph API Requests, access tokens, and App Insights. FBSDKLoginKit provides functionality to log people in, and only requires...
ios,facebook,facebook-graph-api,facebook-ios-sdk
You can just call the [FBSession requestNewReadPermissions:completionHandler:] method. It will automatically add the rerequest auth_type for you.
ios,swift,firebase,facebook-ios-sdk,firebasesimplelogin
So the solution was that the Firebase documentation is outdated - FB`s SDK is already in swift so there is no necessary to add import to your bridging header file. Everything you need to do is just add import to your swift file and you are ready to go import...
ios,objective-c,facebook-ios-sdk
I think it's because the last Facebook SDK only returns our friends which allow the app to access their profile information. Thus, our friend list will only return friends which allowed the App before the request. As you can see below the permissions to access our friend list: "Permissions A...
ios,objective-c,parse.com,facebook-login,facebook-ios-sdk
The problem isn't yours. It was created by version 1.7.4. I faced it too. This temporary fix is a category on NSData that provides the missing selectors. Here it is a header, NSData+PFData.h: @import Foundation; @interface NSData (PFData) + (NSData *) PF_dataFromBase64String: (NSString *) base64; - (NSString *) PF_base64EncodedString; @end...
ios,objective-c,cocoapods,facebook-ios-sdk
Like the warning suggests, one option is to add @dynamic selection; to the implementation in FBFriendPickerViewController.m and @dynamic allowsMultipleSelection; to the implementation in FBPeoplePickerViewController.m (you could also use a #pragma directive to silence the warning, or as you suggest, comment out the superfluous declaration entirely). Of course if you're using...
ios,facebook,facebook-graph-api,facebook-ios-sdk,facebook-graph-api-v2.0
To use the invitable_friends edge, your app needs to be: classified as a 'Game' within your app's settings have a Canvas presence - which means enabling the Canvas platform within your app's settings. The error you're seeing above is because your app is not categorized as a game, not because...
ios,facebook,swift,facebook-ios-sdk
I solved my issue by using another method for promting the user credentials. I used FBSession.activeSession().openWithBehavior(FBSessionLoginBehavior.ForcingWebView, completionHandler:{ // Stuff... } With the .ForcingWebView it always starts over and promting the users ceredntials....
ios,itunesconnect,facebook-ios-sdk
The same issue happens with the Google+ SDK, the app could be rejected for the same reason: Reasons 10.6: Apple and our customers place a high value on simple, refined, creative, well thought through interfaces. They take more work but are worth it. Apple sets a high bar. If your...
No, you cannot include any text for the message part of the post. Doing so would be against section 2.3 of the Platform Policy (https://developers.facebook.com/policy/)
ios,facebook,facebook-opengraph,facebook-ios-sdk
Solved! :) But you wouldn't believe where the problem turned out to be. This line: [action setNumber:@(duration) forKey:@"activity_duration"]; caused it all. There is no activity_duration parameter when it comes to actions. It's a shame that the error message wasn't more descriptive. Also, if you need to share Open Graph object,...
ios,objective-c,facebook-ios-sdk
You have to call `loadData' on your view controller. So, full code is: FBFriendPickerViewController *friendPicker = [[FBFriendPickerViewController alloc] init]; [friendPicker loadData]; [[CCDirector sharedDirector] presentModalViewController:friendPicker animated:YES]; ...
ios,facebook-login,facebook-ios-sdk
FBLoginView maintains the session in FBSession.activeSession, and once the user has logged in once, it also caches the credentials in the KeyChain. So what you can do is: [FBSession openActiveSessionWithAllowLoginUI:NO]; if ([[FBSession activeSession] isOpen]) { // do regular stuff } else { // segue to loginView } This will attempt...
ios,objective-c,facebook,facebook-ios-sdk
This seems to be an issue when using Facebook iOS SDK 3.13.1. I upgraded to Facebook iOS SDK 3.14.1 and this problem went away.
swift,facebook-graph-api,facebook-ios-sdk
The currentProfile is fetched asynchronously after the SDK gets an access token, so depending on when you're asking for the currentProfile, it may be nil. You can also observe the FBSDKProfileDidChangeNotification for when the profile is updated. See https://developers.facebook.com/docs/reference/ios/current/class/FBSDKProfile/...
ios,facebook-ios-sdk,facebook-share
There is no shareFromViewController method in SDK for sharing.It's the showFromViewController method used for sharing. [FBSDKShareDialog showFromViewController:self withContent:tempContent delegate:self]; OR FBSDKShareDialog *shareDialog = [[FBSDKShareDialog alloc] init]; shareDialog.delegate=self; shareDialog.fromViewController = self; shareDialog.shareContent = content; [shareDialog show]; //Delegate methods - (void)sharer:(id<FBSDKSharing>)sharer didCompleteWithResults:(NSDictionary *)results{ } -...
facebook-graph-api,facebook-ios-sdk
No, unfortunately, there's no API for that.
ios,objective-c,facebook-graph-api,facebook-ios-sdk
When successfully uploading the image, you are given the url of the image (key:uri), you could work out the image id from that i guess. Having the image url should be enough to work with.
ios,facebook-ios-sdk,facebook-invite-friends
invitable_friends only available to Games, and requires the user_friends permission. For more details visit https://developers.facebook.com/docs/graph-api/reference/user/invitable_friends/...
facebook,facebook-ios-sdk,facebook-android-sdk
No, if you remove a platform you don't need and later re-add it, or add a new platform, that will not require you to re-submit your app for review (unless your app on the new platform also requires new permissions you haven't already been approved for). We may still review...