Send Message or App Request to facebook friend using Social Framework in iOS

408 views Asked by At

Actually Previously i am using FBGraph for sending message to facebook friend. But now its not working. its give error like

{error={
    code = 200;
    message = "(#200) Feed story publishing to other users is disabled for this application";
    type = OAuthException;
}}

i want to use social framework that available in IOS 6. so i want to use that for sending message or app request. any suggestion how can i implement.

i use apprequests to send message it's give below error

{"error":{"message":"(#200) All users in param ids must have accepted TOS","type":"OAuthException","code":200}}

i use posts to send message it's give below error

{"error":{"message":"Unsupported post request.","type":"GraphMethodException","code":100}}
1

There are 1 answers

0
Aardvark On

Maybe it's permissions ?

Ask for the appropriate permissions for your app to get access.

NSArray *askForPermission = [NSArray arrayWithObjects: ... permissions ...., nil];
[[FBSession activeSession] requestNewPublishPermissions:askForPermission defaultAudience:FBSessionDefaultAudienceOnlyMe completionHandler:^(FBSession *session, NSError *error) {
       if (error)
       {
          // If error occured do something
          failureHandler();
       }
       else
         completionHandler();
 }];