Quantcast
Viewing latest article 12
Browse Latest Browse All 28

Publishing facebook new feeds in home

I'm using the Facebook SDK and, in general, it works fine. But when I publish a new feed it only appears on my timeline and not in my friend's news (their facebook homepage).

So friends that want to see my feed have to go to my profile - which is not what I want.

Is there a setting in my facebook app that I have to change? Where in the Facebook Developers Portal is this setting?

EDIT:

Sorry I forgot the language! I'm programming in iOS SDK.

Here the code to publish new feed:

-(IBAction)publishStream:(id)sender

{

String *myString = "Test string!"

SBJSON *jsonWriter = [[SBJSON new] autorelease];

//post's link
NSArray* actionLinks = [NSArray arrayWithObjects:[NSDictionary dictionaryWithObjectsAndKeys: 
                                                  @"Download iPhone app",@"text", //link name
                                                  @"http://itunes.apple.com/it/app/id399663397?mt=8",@"href", //link url
                                                  nil], nil];


NSString *actionLinksStr = [jsonWriter stringWithObject:actionLinks];

//post image
NSDictionary* media = [NSDictionary dictionaryWithObjectsAndKeys:
                       @"image", @"type", //type of media
                       @"http://img834.imageshack.us/xxx.png", @"src", //image link
                       @"http://itunes.apple.com/it/app/idxxxxx", @"href", nil]; //if image is clicked go to link "x"
NSArray * arraymedia = [NSArray arrayWithObject:media];



//image and post links
NSDictionary* attachment = [NSDictionary dictionaryWithObjectsAndKeys:
                            @"My app name", @"name", //name near image
                            arraymedia, @"media",
                            myString, @"caption", //caption - little image under our app
                            @"http://itunes.apple.com/it/app/idxxxxx/", @"href", nil];//link of caption

NSString *attachmentStr = [jsonWriter stringWithObject:attachment];


//post settings
NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                               kAppId, @"api_key", //fb api key
                               @"Share on Facebook",  @"user_message_prompt", @"Post test for my app", @"message", //user can modify message post                                  actionLinksStr, @"action_links",
                               attachmentStr, @"attachment",
                               nil];

[_facebook dialog: @"stream.publish"
        andParams: params
      andDelegate:self]; 

}


Viewing latest article 12
Browse Latest Browse All 28

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>