0

I uploaded video from using Facebook latest sdk its works fine. I have created in ios app in Facebook developer account. Still my app in testing mode. My app was not published in app store. I have tested with my facebook account video was uploaded to my facebook account . My app status was in live. I tried with my friend account below error came all the time. Please help me how to make works with other users. i have used code below for video uploading

NSString *filePath = [[NSBundle mainBundle] pathForResource:@"sample" ofType:@"mov"];
NSData *videoData = [NSData dataWithContentsOfFile:filePath];

NSString* videoName = [filePath lastPathComponent];
NSMutableDictionary* params = [[NSMutableDictionary alloc] init];
[params setObject:@"testing from ios app" forKey:@"description"];
[params setObject:videoData forKey:videoName];

[FBRequestConnection startWithGraphPath:@"me/videos"
                                                                      parameters:params
                                                                      HTTPMethod:@"POST"
                                                               completionHandler:^(FBRequestConnection *connection,
                                                                                   id result,
                                                                                   NSError *error)
                                          {

                                          }];

In apple developer account only showing approved for email,public_profile,user_friends.

     permissions:(
    "public_profile"
)>, com.facebook.sdk:ParsedJSONResponseKey={
    body =     {
        error =         {
            code = 200;
            message = "(#200) Requires extended permission: publish_actions";
            type = OAuthException;
        };
    };
    code = 403;
}}
2vision2
  • 4,933
  • 16
  • 83
  • 164

1 Answers1

2

It means that you need request for publish_actions permission before upload. See Facebook Login for iOS, search for Checking for permissions.

sahara108
  • 2,829
  • 1
  • 22
  • 41
  • I have checked and add the publish_actions. its uploading the video for my user accounts. i tried with other account its getting error for "App Not Setup: The Developer of this app have not set up this app properly for Facebook Login". Please advice how it will work – 2vision2 Dec 18 '14 at 10:12
  • Is your app enable sandbox mode? And you should also check App Restrictions in Settings. I suggest you should look carefully this https://developers.facebook.com/docs/facebook-login/ios/v2.2. Notice: A Facebook app properly configured and linked to your iOS app, with Single Sign On enabled – sahara108 Dec 18 '14 at 10:48