User Tools

Site Tools


php:examplecodes

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
php:examplecodes [2015/07/25 19:49] – [Facebook share Custom] adminphp:examplecodes [2022/10/29 16:15] (current) – external edit 127.0.0.1
Line 405: Line 405:
 <div class="fb-comments" data-href="<?php echo $_product->getProductUrl(); ?>" data-numposts="5"></div> <div class="fb-comments" data-href="<?php echo $_product->getProductUrl(); ?>" data-numposts="5"></div>
 </code> </code>
 +  - Step3: Update layout display of buttons follow link https://developers.facebook.com/docs/plugins/like-button?locale=vi_VN#faqlayout
 +==== Facebook Fanpage Box ====
 +Go to link https://developers.facebook.com/docs/plugins/page-plugin to config and create HTML code:<code html>
 +<div class="fb-page" data-href="https://www.facebook.com/ShopBabiesVn/" data-small-header="false" data-adapt-container-width="true" data-hide-cover="false" data-show-facepile="true"><blockquote cite="https://www.facebook.com/ShopBabiesVn/" class="fb-xfbml-parse-ignore"><a href="https://www.facebook.com/ShopBabiesVn/">Shop Babies VN</a></blockquote></div>
 +</code> => In case you have created other facebook integration, you **don't need to add javascript code** which generated by generate tool above
 ==== Facebook share Custom ==== ==== Facebook share Custom ====
 refer: https://developers.facebook.com/docs/sharing/web refer: https://developers.facebook.com/docs/sharing/web
   - Step1: Create [[https://developers.facebook.com/docs/sharing/webmasters#markup|Open Graph Tag]] => **Facebook Crawler** will use internal heuristics to make a **best guess about the title, description, and preview image** for your content. So we need to check the **share on real website** for facebook crawl the data exactly   - Step1: Create [[https://developers.facebook.com/docs/sharing/webmasters#markup|Open Graph Tag]] => **Facebook Crawler** will use internal heuristics to make a **best guess about the title, description, and preview image** for your content. So we need to check the **share on real website** for facebook crawl the data exactly
-  - Step2: Go to link https://developers.facebook.com/tools/debug/ and enter the link  of your website to check Open Graph Tag -> we need fix all errors when debug with this tool. With old pages,facebook has cached informations on this page, so the facebook will not recognize the Open Graph Tag update with new image. Therefore, we must use debug tools to refresh these caches -> Fix error can't comment and share missing the image(Click **Show Existing Scrape Information** to get new information)+  - Step2: Go to link https://developers.facebook.com/tools/debug/ and enter the link  of your website to check Open Graph Tag -> we need fix all errors when debug with this tool. With old pages,facebook has cached informations on this page, so the facebook will not recognize the Open Graph Tag update with new image. Therefore, we must use debug tools to refresh these caches -> Fix error can't comment and share missing the image(Click **Fetch New Scrape Information** 3 times to get new information). Or  wait patiently for **every 30 days to ensure the properties are up to date** as it says in documentation https://developers.facebook.com/docs/plugins/like-button
 ==== Manage Facebook Comments(moderation tool) ==== ==== Manage Facebook Comments(moderation tool) ====
 refer:  refer: 
 +  * new API v3.1: https://developers.facebook.com/docs/graph-api/reference/v3.1/comment
   * Docs: https://developers.facebook.com/docs/plugins/comments#moderation-setup   * Docs: https://developers.facebook.com/docs/plugins/comments#moderation-setup
   * Moderation tool:https://developers.facebook.com/tools/comments   * Moderation tool:https://developers.facebook.com/tools/comments
php/examplecodes.1437853740.txt.gz · Last modified: 2022/10/29 16:15 (external edit)