I am building a Flash site and I want to be able to allow the user to post dynamically produced information to their Facebook wall, but I can't find out any information within the Facebook developers documentation.
Its simple enough in Javascript/HTML:
<script type="text/javascript">
function callPublish(msg, attachment, action_link) {
FB.ensureInit(function () {
FB.Connect.streamPublish('', attachment, action_link);
});
}
</script>
<input type="button" onclick="callPublish('',{'name':'Post this 开发者_如何学运维to Facebook','href':'http://dev2.com','description':'this is some body test'},null);return false;" value="Preview Dialog" />
As you can see I don't want to create sessions or login or anything complicated, just post to info to their wall.
You can call a javascript function from flash. Like a button with getUrl "callPublish('',{'name':'Post this to Facebook','href':'http://dev2.com','description':'this is some body test'},null);return false;"
.
You can also use ExternalInterface to call a javascript function from Flash.
See http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/external/ExternalInterface.html
精彩评论