问题
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