How do I add the like facebook button to a silverlight application?

不羁的心 提交于 2019-12-24 19:26:30

问题


I'm new to silverlight 4 development. I need the facebook I like button to be integrated integrated on my website application?
Can someone tell me how to do that?

Can I download a library that will provide me a user control that is visible in my toolbox, and thus I will be able to just drag and drop this item on my page? If not, how can I implement this functionality?


回答1:


You can just download a like button image from here and use the Facebook SDK to like the page.
I haven't tried it myself but it should be possible.
Another approach will be to use the Javascript API and call it from silverlight.
Here's how: http://www.dotnetspider.com/tutorials/Silverlight-Tutorial-321.aspx
http://www.switchonthecode.com/tutorials/silverlight-and-javascript-interaction
http://www.mostlydevelopers.com/blog/post/2008/08/11/Call-Javascript-Method-from-Silverlight-and-Vice-Versa.aspx




回答2:


If you want to invoke the "I like" feature from silverlight you can just call javascript code (rise the onclick event) from silverlight which located on your page.



来源:https://stackoverflow.com/questions/6213077/how-do-i-add-the-like-facebook-button-to-a-silverlight-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!