- When we write a code for friend the the following error arrive
- The code is given bellow
View control.h file
#import <UIKit/UIKit.h> #import <FacebookSDK/FacebookSDK.h> @interface ViewController : UIViewController <FBFriendPickerDelegate> - (IBAction)FBFriend:(id)sender; @end
View control.m file
-(IBAction)FBFriend:(id)sender { FBFriendPickerViewController* vc=[[FBFriendPickerViewController alloc]init]; [vc loadData]; [vc presentModallyFromViewController:self animated:YES handler:^(FBViewController*sender, BOOL donePressed) { if (donePressed) { NSLog(@"success!"); } }]; }
When we run the code the the following error arive
Terminating app due to uncaught exception 'com.facebook.sdk:InvalidOperationException', reason: 'FBSession: No AppID provided; either pass an AppID to init, or add a string valued key with the appropriate id named FacebookAppID to the bundle *.plist'`
Asked
Active
Viewed 978 times
-1

Wahyu Kristianto
- 8,719
- 6
- 43
- 68

Raghu
- 15
- 3
-
the error message says clearly, you need to provide the FacebookAppID, probably this link leads you to the answer: http://stackoverflow.com/questions/3203649/where-can-i-find-my-facebook-application-id-and-secret-key – holex Jun 07 '14 at 08:22
2 Answers
0
first you have create app id for your app in facebook.developers page,you can go for following link for more details link

Ravi
- 2,441
- 1
- 11
- 30
-
i have also created an App id on developer.facebook.com and conf. that id in our project on plist file by adding new row – Raghu Jun 07 '14 at 07:51
0
In App, User first needs to login before send invitation to friends on Facebook and find friend list.
Please find the following link in Facebook docs about login https://developers.facebook.com/docs/facebook-login/ios/v2.0
Please let me know if still you have any questions.

sehaswaran
- 141
- 1
- 8