Chia sẻ sản phẩm lên facebook

Để sản phẩm của bạn tự động đăng lên facebook, khi bạn cần giới thiệu sản phẩm với mọi người..trong OSclass bạn có thể tham khảo theo cách sau.

 thêm thẻ meta vào trong file item.php 

<meta property="og:title" content="Whatever title" />
<meta property="og:description" content="description of your site"/>


VD: Trong file ITEM.PHP


<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# website: http://ogp.me/ns/website#">
<meta property="fb:app_id" content="YOUR FB APP ID HERE" /> 
<meta property="og:type"   content="website" />  
<meta property="og:url" content="<?php echo osc_item_url() ; ?>" />
<meta property="og:title" content="<?php echo osc_item_title(); ?>" />
<meta property="og:image" content="<?php echo osc_resource_url(); ?>" />


Trong file MAIN.PHP


<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# website: http://ogp.me/ns/website#">
<meta property="fb:app_id" content="YOUR FB APP ID" /> 
<meta property="og:type"   content="website" />  
<meta property="og:url" content="http://www.yoursite.com/" />
<meta property="og:title" content="what ever you like, can be different from general settings in your admin panel" />
<meta property="og:description" content="what ever you like"/>
<meta property="og:image" content="http://your_logo_at_least_200x200.jpg" />


và cuối cùng là thừa hưởng thành quả thôi

Nhận xét

Bài đăng phổ biến từ blog này

Cách gộp ô, chia tách ô, bảng trong Word 2007, 2010, 2013, 2016 (#5)

Hướng dẫn viết, tạo phụ đề phim/video đơn giản nhất

Kỹ thuật tìm kiếm trên mạng hiệu quả