Is there a simple Facebook “Like” or share URL?

后端 未结 6 1832
一整个雨季
一整个雨季 2021-02-09 09:36

Is there a simple URL string that Facebook will accept to \"like\" a site... or more accurately (as a commenter points out below), share a site? As a comparison, Twitte

6条回答
  •  感情败类
    2021-02-09 09:58

    There is a non-depreciated equivalent to the twitter or sharer.php functionality, though it is way more annoying. This doesn't exactly answer the question about "liking" a page but does accomplish the exact analogy to the twitter share, which seems to be what the question is asking.

    • https://developers.facebook.com/apps/ - make a new app with a developer account.
    • Make the Display Name the name of your business or website
    • add your domain without http under App Domains
    • add your base URL under Website with Facebook Login (with http )
    • Grab the App ID

    Now make your url like this:

    http://www.facebook.com/dialog/feed?app_id=000000000000000&link=http://example.com/whatever&redirect_uri=http://example.com/backtothesite

    You would think the redirect_uri would default to the user's facebook home or to the link parameter, but it's a required field.

    More parameters here: http://developers.facebook.com/docs/reference/dialogs/feed/

提交回复
热议问题