Reputation: 1
Following a suggestion elsewhere at stackoverflow I am integrating, rather successfully at that! :-), the standard Facebook Like/Share buttons on a web page from which I have extracted a Page Feed. You can see all the points mentioned below at: https://paulsantiques.com/ (give it a minute!).
1) For the first post in the page, the "Happy New Year" (new year in Bangkok is April 12-15) I have programmed the Like/Share button in the upper left after the News to Like/Share the Post ...
$news = $news . "<br /><br /><div class=\"fb-like\" data-href=\"$postslink\"-layout=\"standard\" data-action=\"like\" data-show-faces=\"false\" data-share=\"true\"></div><hr style=\"width: 80%;\"/>";
and the inspection of the element on the News page looks like it is correctly coded for sharing the Post ...
<div class="pluginButton" onclick="require("Popup").open("\/sharer.php?u=https\u00253A\u00252F\u00252Fwww.facebook.com\u00252FPaulsAntiques\u00252Fposts\u00252F10153327531268953&display=popup&ref=plugin", 670, 340);"><div><div class="pluginButtonContainer"><div class="pluginButtonImage"><button type="submit" title="Share"><div class="pluginButtonIconPlaceholder"></div></button></div><span class="pluginButtonLabel">Share</span></div></div></div>
Yet the "You and so many others" text and the actual Like or Post is for the Page (www.website.com), NOT the post.
I've tried eliminating the hr and placing the same $postslinks code elsewhere (other divs, etc.) and same erroneous result everywhere.
An aside: I would think that for this share/like of a single photo post would be same for photo/post - maybe it is, but my testing results in confusion and see 2a below).
This only happens for the share /attachments type = photo. The Like/Share for the types = album and = link Posts work on that page properly, that is to the Post, not to the Page.
....Can anyone advise on getting theses Like/Share buttons to the Posts (att. type photo) working properly?
2) I must have missed a page for customizing these Like/Share buttons??: a) For one, the Like/Share for the media (i.e. those in the picture hover captions) share the LINK to the picture, not the picture. b) Getting the Like/Share buttons to do anything other that left justify has been very problematic; c) I could obviously use some advice on customizing the Like/Share buttons (colors? ...). ...Is further information on customizing these Like/Share buttons available?
Upvotes: 0
Views: 85
Reputation: 73984
1) You can only use the Like/Share Buttons for external URLs or Facebook Pages, but not for anything else on Facebook.
2) You can only select some settings in the Button Generator: https://developers.facebook.com/docs/plugins/like-button - Changing the appearence in any way is not allowed. Check out the brand permissions: https://www.facebookbrand.com/dos-donts
Don´t modify Facebook brand assets in any way, such as by changing the design or color
Upvotes: 1