开发者

How do I post dynamic information to Facebook from Flash?

开发者 https://www.devze.com 2022-12-27 13:00 出处:网络
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

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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号