Search code examples
iphonefacebookfacebook-graph-apiios6facebook-ios-sdk

can't post image description in facebook


I can't post in facebook feed an image with description.

here the code I given, It will share the image but , can't post description

NSDictionary *parameters=[NSDictionary dictionaryWithObjectsAndKeys:categoryname,@"category",descr,@"description",dataImage,@"picture", @"image/jpeg",@"content_type", nil];

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

Edit: I can post photo but, doesn't post the description.


Solution

  • /me/feed do not support the Image data. If you see the documentation (Feed), its written-

    The URL of a picture attached to this post. The picture must be at least 200px by 200px. See our documentation on maximizing distribution for media content for more information on sizes.

    That means you have to give a valid url to the picture only.


    As an alternative, I would recommend to use, /me/photo since it supports image data and I think picture is quite significant in your case, and feed shows just a small thumbnail.- You call.

    More details- Photo