简体   繁体   中英

add custom text to facebook share popup

I am trying to do this:

Mr. Testman clicks on facebook share button on my page. it pops up and shows an empty field where Mr. Testman can write his own text and hits on share button. But sometimes Mr. Testman does not have time to write his text, so he wishes there would be a default text like I like this and wanted to share with you guys .

How can I add this custom text as a default share text?

sharer.php is no londer supported by facebook, i dont see any settings for this in docs.

Bad news, you can't. The share dialog and the share button are triggered by the user, that's why you don't need to create an app and ask for any permissions, because the user has full control of what his sharing.

The only way to do that is creating an app, ask users for publish_actions permission and then do a POST to the graph api :

POST graph.facebook.com
  /{user-id}/feed?
    message={message}&
    access_token={access-token}

You can read more about it here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM