I am trying to setup a share button for facebook, twitter, and the other major share sites. The thing is when I use the methods I have found they only let me manually add the url to the share, not the text or title. This is an issue because on my site the share buttons would be on some posts, the main page showing 10 at a time, with a quotes page showing one and the comments. These posts are gotten from the database via a php function, returned to the index and it shows them. Then index takes care of what type to show.
The issue here is the share button looks at index.php for the title and text, both of which are dynamically added. So it find the wrong data. Is there anyway to manually tell it what text and title to use? If not then any advice on what to redesign to make it work?
Site url: http://ohmsgaming.com/nstdt/index.php
I’m not exactly sure what you mean by “share”, but if you are referring to the old share button/url then you should not use it since it’s deprecated and no longer supported as it states here:
(reference: http://developers.facebook.com/docs/share/)
And here:
(reference: http://developers.facebook.com/docs/reference/plugins/like/)
Instead use the Like button, and just use different urls for the url of the like, something of of this sort: *http://your.domain/post.php?id=POST_ID*.
The data will be extracted by facebook from your page, so you need to specify open graph tags that match the POST_ID.
Another approach is to use the fb js sdk to post to the feed, like so:
As you can see you can control all fields.