Is there any way to make facebook share button which post custom text on the wall or news feed?
相关问题
- facebook error invalid key hash for some devices
- LoginActivty with Firebase & Facebook authenticati
- facebook “could not retrieve data from URL”
- setRequestHeader Content-Type causes POST request
- Sharing to Facebook Stories
相关文章
- Facebook login for group members
- The method FB.api will stop working when called fr
- React native deep linking vs Facebook SDK conflct
- UIActivity with no settings for Facebook
- facebook send API Error Code: 100 API Error Descri
- Can't use Facebook Account Kit: Error inflatin
- Facebook API error subcode 33
- Devise + Omniauth: undefined method `user_omniauth
This is a simple dialog feed that Facebook offer's. Read here for more detail link
This is the current solution (Dec 2014) and works quite well. It features
<a onclick="return !window.open(this.href, 'Share on Facebook', 'width=640, height=536')" href="https://www.facebook.com/sharer/sharer.php?u=href=$url&display=popup&ref=plugin" target="_window"><img src='/_img/icons/facebook.png' /></a>
$url var should be defined as the URL to share.
You have several options:
To give custom parameters to facebook share its better to give only the link and facebook gets its Title + Description + Picture automatically from the page that you are sharing. In order to "help" facebook API find those things you can put the following things in the header of the page that you are sharing:
Check here
If the page is not under your control use what AllisonC has shared above.
For popup modalview type behavior:
Use your own button/link/text and then you can use a modal view type of popup this way:
where twitterbtn-link and facebookbtn-link are both ids of anchors.
We use something like this [use in one line]:
use this function derived from link provided by IJas
Or you can also use the latest FB.ui Function if using FB JavaScript SDK for more controlled callback function.
refer: FB.ui