Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to share post in Facebook using PHP?

Tags:

php

facebook

I have 5 divs in my program and in each div, it contains different content and share on FB button. Now when I click on this button, I need to share that particular content on FB. How can I do that?

like image 659
Div Avatar asked Oct 29 '12 07:10

Div


1 Answers

There are 2 ways. Below links may help you. I am using code from this article.

1) Using javascript:

http://thinkdiff.net/facebook/new-javascript-sdk-oauth-2-0-based-fbconnect-tutorial/

2) Graph API

http://thinkdiff.net/facebook/php-sdk-3-0-graph-api-base-facebook-connect-tutorial/

like image 140
VibhaJ Avatar answered Sep 28 '22 02:09

VibhaJ