83686

Post on Facebook Page from iOS App Not Showing Up on Page?

I am posting a picture and dummy text on a facebook page with the Page Id "848190045198980".I am signing in using my facebook credentials.Also I have admin role for the specific page.So I am just getting the basic permissions from facebook.Below is the request and the response.

<strong>Request :</strong>

UIImage * productImage = [UIImage imageNamed:@"corporate.png"]; NSData * imageData = UIImagePNGRepresentation(productImage);

NSDictionary *params = @{@"message": @"Hello XYZ", @"source":imageData};

[FBRequestConnection startWithGraphPath:@"/848190045198980/photos" parameters:params HTTPMethod:@"POST" completionHandler:^(FBRequestConnection *connection, id result, NSError *error) { if(!error) { if(completionBlock) { NSLog(@"%@",result); completionBlock(YES,result,nil); } } else { if(completionBlock) completionBlock(NO,nil,error); } }];

<strong>Response :</strong> {"id":"1481175438805031","post_id":"848190045198980_1481175438805031"}

<strong>Expected Result :</strong> My Post should show up on the Facebook Page in "Posts to Page" Section.

<strong>Actual Result :</strong> Nothing Shows Up.

Please point me in the right direction as to what I am missing here.I have checked the API Doc several times and I am finding it real tough as to where I am missing something.

Regards, Roman

Answer1:

NSDictionary *params = @{ @"message":message, @"tags":Mystring, @"link":@"http://www.miimobileapp.com/website/index.html", @"privacy": @"{'value': 'SELF'}", }; /* make the API call */ FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc] initWithGraphPath:@"/me/feed" parameters:params HTTPMethod:@"POST"]; [request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,id result,NSError *error) { NSLog(@"Post successful"); }

This is how I am posting video on facebook Hope this will help You

Recommend

  • SetPixel() too slow to erase image background
  • Using std::complex with iPhone's vDSP functions
  • Application crash on login in ios Facebook SDK 3.0
  • Get user shared video data from Facebook graph api
  • python — measuring pixel brightness
  • Trouble with adding item into an NSMutableArray inside a block
  • What should I do to not show the legend for all the plots?
  • Unexpected behavior of numpy.fft.fft with high precision numbers
  • FFT wrong value?
  • Casting an array of C structs to a numpy array
  • Mayavi: interpolate face colors in triangular_mesh
  • Fetch Facebook friends list of logged user
  • Handle pagination of Facebook user photos
  • Facebook Request Never Gets Executed
  • How to configure a non-default serviceAccount on a deployment
  • How create UIImage from bytes?
  • Error Domain=NSCocoaErrorDomain Code=3840 “Invalid value around character 0.” UserInfo={NSDebugDescr
  • Override FROM image's ENV in Dockerfile
  • How to search a string in inner array using mongodb?
  • Modifying files nested in tar archive
  • Replace and retrieve placeholder value
  • auth.provider is not set to 'password' when user signs-in with email and password
  • android Navigation Bar hiding and persantage of usable screen overlap
  • Floated image with variable width and heading with background image
  • Connect .sks to skscene.h
  • Retrieve list of sent friend requests from friend_request FQL table
  • How to have background script and something similar to a default popup?
  • Rails Find when some params will be blank
  • Python urlparse: small issue
  • NHibernate Validation Localization with S#arp Architecture
  • How can I send an e-mail from a vbs script
  • Nant, Vault & Windows Integrated Authentication
  • Counter field in MS Access, how to generate?
  • Accessing IRQ description array within a module and displaying action names
  • Javascript + PHP Encryption with pidCrypt
  • Websockets service method fails during R startup
  • GridView Sorting works once only
  • Why can't I rebase on to an ancestor of source changesets if on a different branch?
  • Getting Messege Twice Using IMvxMessenger
  • Can't mass-assign protected attributes when import data from csv file