Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FB Share without App ID

Is it possible to use FB share plugin without APP ID? If I use HTML5 code then the console logs an error FB.getLoginStatus() called before calling FB.init(). To use HTML 5 FB like is it necessary to have an APP ID?

Thank you

like image 807
1Mayur Avatar asked Jan 15 '23 10:01

1Mayur


1 Answers

Here i am sharing what i did to share post on fb wall, In this way you do not need to use appId. Just put this code in your HTML page where you want link to share...

<a name="fb_share" type="button" href="http://www.facebook.com/sharer.php?u={$url}&media={$imgPath}&description={$desc}" class="joinFB">Share Your Advertise</a>

URL parameters are as explained below,

u : url or link you want to user to go when he clicks on your wall post,

media : full image path,make sure that image is available on given path,it will accept one image only

description : a short description that you want to show on wall

it will look like this image when you click on the share button

It will also ask you to write some data which will be displayed above your post. Description passed in url will be displayed in right side of your image.

Please note that i had passed $url,$desc,$imgPath variables as per my need. The above code is in smarty-php, so change it as per your requirement.

Hope this becomes helpful to you.

like image 67
Kaushal Bhatt Avatar answered Jan 25 '23 12:01

Kaushal Bhatt