0

I am using following code to share a link.

[self.facebook dialog:@"feed" andParams:params andDelegate:self];

everything works fine except in iPhone, description not visible. It only shows title & image.Is it a bug with Facebook iPhone app or do i miss anything?

Arun
  • 41
  • 5

1 Answers1

0

If your need is only sharing post on your wall means, use below code, before that add social.framework. And facebook.h are deprecated. For your ref: https://developers.facebook.com/docs/ios/ui-controls

NSString *url_pass = @"your url";

NSURL* url = [NSURL URLWithString:[url_pass stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];

if([SLComposeViewController isAvailableForServiceType:SLServiceTypeFacebook]) {
    SLComposeViewController *FacebookSheet = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeFacebook];

    [FacebookSheet setInitialText:@"Completed Challange"];
    [FacebookSheet addURL:url];
   [FacebookSheet addImage:[UIImage imageNamed:@"logo@2x.png"]];

    [self presentViewController:FacebookSheet animated:YES completion:nil];
Ramdhas
  • 1,765
  • 1
  • 18
  • 26