tags:

views:

48

answers:

0

Hi Salmon

I see you have some knowledge on stream publish and wondered if you could help me out by answering a couple of questions.

1)

I have a flash movie which sends a request to page that writes information to a DB

The page that writes to the DB returns success=1 or success=0 and the flash movie there after processes depending on the response.

Howvever, I wish also to post to the wall amidst this process.

Is this possible? And if so how might i go about doing it?

2) I have a streamPublish script defined in JS that works fine. However, i wish to ass some style to the description variable.. ie. i want to add a carriage return after the first line? Is this possible?

3) After description i want to put a link. I dont want to use properties as this renders a label. I simply require a link after description.

I thought that action_links was how i would do this but for the life of me i cant render a link after my description paragraph.

My JS function i have developed is at end of this message.

Any help you could offer in these problems would really be appreciated as i have now spent about 48 hours on it trying to sort and am most frustrated.

function fb_publish_question($sender,$town,$tradeurl) { $tmp = str_replace("'", "",'\'s bid for a prize as part of Ben and jerry\'s 100 fair Trades'); $qText = str_replace(""", "", $tmp);

print " var attachment =
{'name': '$sender\'s bid for a prize as part of Ben and jerry s 100 Fair Trades', 'href':'http://apps.facebook.com/onehundredfairtrades', 'description': 'Think you could do better? You could win a load of Ben and Jerry s or Fairtrade prizes', 'caption': 'Is $sender\'s bid the best? ', 'media': [ {'type':'image','src':'$tradeurl','href':'http://apps.facebook.com/onehundredfairtrades'} ],
'properties': { 'Win': { 'text': 'Click here to place your bid', 'href': 'http://apps.facebook.com/onehundredfairtrades'} }
}; var action_links = [{'text': 'Submit your bid now!', 'href':'http://apps.facebook.com/onehundredfairtrades'}];

    Facebook.streamPublish('', attachment, action_links, null , null, null , null);  

    </script>";

}

related questions