facebook-ios-sdk

How to send add friend request (to facebook user) from iOS application?

淺唱寂寞╮ 提交于 2019-11-27 14:13:17
I know there are lot of questions on this topic but none of those have satisfactory answers. Again I am not so confident about help as 2 of my last 3 questions are unanswered. Well Still, ma question is, Is there any way we can send friend request to any facebook user from one iOS application? Of course we have user id of that user. As I have googled much and went through many links including how send friend request to a person in Facebook through iPhone app? Can a facebook friend request be sent from my own app? https://developers.facebook.com/docs/reference/dialogs/requests/ etc.. And

How can I convert FBProfilePictureView to an UIImage?

本秂侑毒 提交于 2019-11-27 13:38:37
Everything is working fine with FBProfilePictureView but I need to get that picture from FBProfilePictureView and turn it into an UIImage. How should I do it? I tried using this: UIGraphicsBeginImageContext(self.profilePictureView.frame.size); [self.view.layer renderInContext:UIGraphicsGetCurrentContext()]; UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); self.TestPictureOutlet.image = viewImage; But this doesnt work for my solution. FBProfilePictureView is a UIView, this UIView contains a UIImageView, that is your image, you can get the UIImage

Handle invalid accessToken with FBSession openActiveSessionWithReadPermissions in Facebook iOS 3.1.1 SDK

余生颓废 提交于 2019-11-27 13:17:00
Before anything, I have read both this and this questions to solve the problem below and before asking. My problem is that when the accessToken gets expired (either because the expiration date passes, or manually by deleting the app from my Facebook's App Center) the following code: if ([[FBSession activeSession] isOpen]) { //do something } else { [FBSession openActiveSessionWithReadPermissions:nil allowLoginUI:YES completionHandler:^(FBSession *session, FBSessionState status, NSError *error) { if(FB_ISSESSIONOPENWITHSTATE(status)) { //do something } } }]; } gets in the else block with

“apprequests” dialog reports success, recipients receive nothing

孤者浪人 提交于 2019-11-27 13:14:09
Using the Facebook iOS SDK I can display a dialog with apprequests and send it. Delegate method -dialogDidComplete: gets called, but the recipient(s) receive no notification or request of any kind. If they have the app authorized, Facebook.app (for iOS) will display a number of pending requests next to the app bookmark, but notification jewel doesn't get updated and notification is nowhere to be found and Facebook.app doesn't display any push notifications. I have followed Facebook's own tutorial for this and even tried with their own sample project Hackbook, but I get the same result every

Facebook iOS SDK 3.0, implement like action on a url?

我的梦境 提交于 2019-11-27 12:33:56
问题 I'm trying to implement Like via the facebook open-graph-api with the Facebook iOS SDK 3.0. Everything seems to work except the FbGraphObject and that's because I have no idea how it should look because this clearly does not work. What I'm trying to do is to like a url posted as an object. A simple Like with via the open-graph. The error message I get the the code below is: The action you're trying to publish is invalid because it does not specify any reference objects. At least one of the

How to make Xcode find file FacebookSDK.h?

百般思念 提交于 2019-11-27 12:01:11
It says "FacebookSDK/FacebookSDK.h file not found" Yet I can jump-to-definition on the #import and it takes me to the file. And once I added the #import it now knows what FBFriendPickerDelegate is and it now doesn't have an error on that line. I have the facebookSDK.framework in my project and in the right folder. It's SDK 3.1. I tried adding search paths to /FacebookSDK and /FacebookSDK.framework and /FacebookSDK/Versions/A/Headers etc. I also tried #import "FacebookSDK.framework/Versions/A/Headers/FacebookSDK.h" and it still says it can't find it. I also tried clean and restarting. I have

No such module 'RestKit' with cocoapods and swift

怎甘沉沦 提交于 2019-11-27 11:32:08
I am having this problem with a brand new project. This problem happens with both RestKit and Facebook SDK. Strangely SwiftyJSON works just fine. I create a brand new swift project and a Podfile with: source 'https://github.com/CocoaPods/Specs.git' use_frameworks! target 'test-fb-swift4' do pod "FBSDKCoreKit" pod 'SwiftyJSON', '~> 2.1' pod 'RestKit', :inhibit_warnings => true end target 'test-fb-swift4Tests' do end After creating that file I run pod install and reopen xcode with the test-fb-swift4.xcworkspace file. Now inside my controller I put a import RestKit and I get the error No such

How to retrieve Facebook response using Facebook iOS SDK

我的未来我决定 提交于 2019-11-27 11:15:55
I am using the Facebook iOS SDK for iPhone. I initialize the Facebook instance facebook = [[Facebook alloc] initWithAppId:kAppId]; And then I do login: [facebook authorize:permissions delegate:self]; After I logged in to Facebook I am doing the following to get the user profile information: [facebook requestWithGraphPath:@"me" andDelegate:self]; NSMutableData *response = [fbRequest responseText]; unsigned char *firstBuffer = [response mutableBytes]; NSLog(@"Got Facebook Profile: : \"%s\"\n", (char *)firstBuffer); But I get the following on my console: Got Facebook Profile: "(null)" What am I

How to customize FBLoginVIew?

僤鯓⒐⒋嵵緔 提交于 2019-11-27 10:26:23
In order to connect to facebook in my ios app i'm using FBLoginVIew from Facebook SDK for iOS . It shows a nice FB Login Button, but I want to use my own image and text for the login button. The problem is that I don't see anywhere how to customize that. I've managed to change the login button background image by overriding the images in FacebookSDKResources.bundle/FBLoginView/images, but I couldn't find where to change the login button text and position, so it's stays "Log in"... Solution, anyone? Thank you The answer is to go over the FBLoginView subviews, find the button and the label and

FBSDKLoginManager logInWithPublishPermissions always returns isCancelled=YES

百般思念 提交于 2019-11-27 08:36:10
I am having trouble figuring out how to log a user into my app. [FBSDKAccessToken currentAccessToken] is nil, so I am calling: [[[FBSDKLoginManager alloc] init] logInWithPublishPermissions:@[@"publish_actions"] handler:…]; as per the included sample project. This switches to the Facebook app, but the message says "You have already authorized App Name .". I click OK and it goes back into the app, but grantedPermissions and declinedPermissions are both nil on the result, and isCancelled is YES . [FBSDKAccessToken currentAccessToken] is still nil . I can't figure out how I'm supposed to get