FB Share without App ID

1Mayur picture 1Mayur · Jan 21, 2013 · Viewed 13.2k times · Source

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

Answer

Kaushal Bhatt picture Kaushal Bhatt · Feb 14, 2013

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.