问题
I don't want a pop up, I want an actual Facebook like button, has anyone got any idea how I would go about it? Is it against Facebook policy?
Thank you
回答1:
I don't think this is anything specific to Java. Just use whatever method of generating HTML you are using, and put the tags in to load the Facebook javascript SDK and put an fb:like element on the page.
Currently there is no API by which you can create a Like directly - the only way a user may "Like" something on Facebook is using their Like button code embedded in the standard way.
You can create your own actions on the timeline that look like a "like", you just need their permission. You can use OAuth to get that, google can help you find examples of Facebook clients in Java.
来源:https://stackoverflow.com/questions/9870665/is-it-possible-to-add-a-facebook-like-button-on-a-java-application