Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

uaecasher

macrumors 65816
Original poster
Jan 29, 2009
1,289
0
Stillwater, OK
hello,

I want to publish feed from my application, my question is how can use a varible from my app as the description content.

So here is what I have came up with for the other pars:

Code:
FBStreamDialog* dialog = [[[FBStreamDialog alloc] init] autorelease];
    dialog.delegate = self;
    dialog.userMessagePrompt = @"Example prompt";
    dialog.attachment = @"{\"name\":\"iPhone App test\",\"href\":\"http://www.mozymac.com/forums\",\"caption\":\"Caption\",\"description\":\"Description\",\"media\":[{\"type\":\"image\",\"src\":\"http://mozymac.com/forums/images/misc/logo.png\",\"href\":\"http://www.mozymac.com/forums/\"}],\"properties\":{\"another link\":{\"text\":\"Facebook home page\",\"href\":\"http://www.facebook.com\"}}}";
    // replace this with a friend's UID
    // dialog.targetId = @"999999";
    [dialog show];

I want to change Description to display a string from a variable, let's say "mainstring" for example.

Thanks
 
You would have to create a stringWithFormat for the delegate.attachment. This will allow you to use variables in the message. You just use %@ for where variable text goes then at the end of the initial string comma the variable names.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.