Facebook App ID, Facebook Pages, Likeboxes - javascript

Perhaps you can help me here: To use the Facebook JS Api, you need an App ID. So I created an application, used the App ID for a likebox on my website. Now it seems that when people click on like, they like the app and not my website ... now does someone know what to do if you want a Likebox for the website, and not for the app?
Have I screwed up? I don't think I can convert the app to a facebook page (a fb "page" ist the right way to go here, isn't it?), can I?
Thanks for the help.

To like a website rather than a page, you need to use the 'Like' widget.
This has a little more info for you and will generate the iframe code to add to your site too:
http://developers.facebook.com/docs/reference/plugins/like
Hope that helps!

Related

What is the Facebook app ID?

I'm creating an online quiz website. I have everything setup and I am just working on the social buttons. At the end of the quiz, I want a share button to appear for Facebook and I want to customize the thumbnail and title and stuff like that based on the user's result.
To do this, I am trying to implement the Facebook Javascript SDK, but it needs an app ID. What is this and where do I get it?
You need to create an facebook app for yourself in facebook developer site.
After creating it, you can goto YourApp -> Settings
It will have an APP ID

Modify FB page plugin on my website

Hi Happy New Year and thanks in advance for your time..
So im using Facebook javascript SDK to display my FB page on my site. Its showing up as expected. Good.
Now I want to alter the Fb page title after it has loaded in my site. I tried getElementByClassName in javascript. But no effect(may be because of iframe?). This is the actual pic
And this is what i desire -- the fb page plug-in title has been changed.
Is it possible to achive this??
No, it is not possible.
The iframe content is from a different domain, and therefor the Same Origin Policy prevents you from accessing its content via JavaScript from your site.
Finally found a work around for the requirement. It is not possible to modify the page Pugin but -
use php sdk to initialise Facebook and
Use open graph to fetch the posts.
Now you can use this data as you like
By this method even individual posts can be tailored accordingly.
A working example is at -
http://callmenick.com/post/displaying-a-custom-facebook-page-feed

Using fb:// To Share a Post through the Facebook App with Web Interface

One of my sites has a custom share plugin that I've written and I would like to try to get the 'sharing' feature to open up in the native Facebook app if possible. I know that you can use fb:// to open up the app but from what I've read, this is part of FBML which has been deprecated for several years. What I ideally would like is to have the link open up the FB app with a pre-populated link in the share box that the user could then just automatically share. Basically the functionality of the sharer.php script (it's ok if it pulls the data from the OG tags).
I know it can be done in iOS apps (and probably Android) but is it possible to do through a web interface?
I have the links I'm using only showing on mobile devices through some Javascript so I wouldn't have to worry about it causing any problems sitewide.
Thanks for your help!
var url = encodeURIComponent('http://example.org/');
window.open(
'https://www.facebook.com/sharer/sharer.php?u='+url,
'Share on Facebook',
'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600'
);
That's the simplest way I do it ;)

Cannot add external javascript to Facebook Pages

I have an app which is embedded in a facebook page which happens to be an iframe.
There seems to be fb security concerns over usage of external javascript links. So I have replaced all my external links by either downloading them or some other tweak
For eg. js css libraries hosted at googleapis .
However I am facing a serious issue while removing the dependency of a 3rd party called 'Share This' which happens to be a plugin for share widgets of Social Websites like Fb,Twitter,Google Plus.
I have checked some other options like addthis.com but it again depends on importing external javascript which would be an issue again.
Share buttons of twitter and facebook given by them are HTML solution and would require share URL to be specified in advance but my share buttons will get the url to be shared dynamically after some process.
Is there any way which I could create Facebook , Twitter , Google Plus share buttons dynamically with custom url to share ( not the website page Url ).
Any help would be really appreciated ! :)
Cheers :)

App Id of sandboxed app for like button

I want to add a like button to a page. I have an app set up, but it is sandboxed. If I init the api with the sandboxed app ID, will the like button still work?
Thanks
The Facebook Like functionality in your case is separate from the application in interest.
Like buttons can be linked to URLs or Pages without the requirement of a Facebook application. All referenced Likes, then, are passed over to the respective linked content and do not pass through an application to do so.
Good luck!

Categories