Reputation: 303
I have a image temp/example.png in my local project folder. I would like to share this image on my facebook timeline using facebook's php sdk. I found this url . So, I formed my share post url string as given below:
var $shareUrl=https://www.facebook.com/dialog/share?app_id=xxxxxx&display=popup&href=https://localhost/PhpProject1/temp/example.png&redirect_uri=https://localhost/PhpProject1/success.html';
echo '<a href="'.$shareUrl.'"><button style="width:70%;background-color:#4267B2;color:white;border:none;height:35px;">Share on Facebook</button></a>';
Then I called this url on button click but, I got 'href should represent a valid URL' error. Here PhpProject1 given in url is php project on my system. I tried to solve this but, not succeeded. So, pleas help me in solving this. Thanks in advance.
Upvotes: 0
Views: 1535