views:

160

answers:

1

hi,

I am new to iphone development.I have created facebook application and i have displayed the login page and publish page. now i want to share my content(title and summary) display dynamically.

i dont know how to give the contents dynamically,

Here my code and display statically, it will published.

but i want to give my contents dynamically displayed.

titles and summaries are stored in the mutable arrays. NSString *art;(titles are stored) NSString *summ; [Summary are stored];

        fbAgent.shouldResumeSession =YES;
    [fbAgent publishFeedWithName:@"Sample"  
                     captionText:@"Test Application" 
                        imageurl:@"http://amanpages.com/wordpress/wpcontent/uploads/2009/12/logo2.png" 
                         linkurl:@"http://www.yahoo.com"
               userMessagePrompt:@"Share Something about this article" 
                     actionLabel:nil
                      actionText:@"Search Google"
                      actionLink:@"http://wwww.google.com"];

This sample code and downloaded in the net. now i want to shared to publish title and summary.

Plz help me out,

A: 

Using the fbagent, you cannot publish title+description only, you have to also provide a link to an image and a webpage url.

The image can be your iPhone app icon stored on your site and webpage url can be appstore download link of your iPhone app.

This will help popularize and advertise your app.

So, minimum you can do is:

    fbAgent.shouldResumeSession = YES;
[fbAgent publishFeedWithName:art 
                         captionText:summ
                            imageurl:@"http://amanpages.com/wordpress/wp-content/uploads/2009/12/logo2.png" 
                             linkurl:@"http://amanpages.com/" 
                   userMessagePrompt:@"What do i think:"];

Hope it helps.

Shaikh Sonny Aman