I'm writing an app. for Facebook using HTML and Javascript. I'm trying to detect with javascript when the "Like" button on the Facebook page is clicked. I don't want to embed a "Like" button on my app page as Facebook already has a "Like" button at the top of the page right after my company's name.
I'm using Facebook's iFrame to display my app, but I haven't found any examples in Javascript to catch the "Like" click event.
Thanks for any help
Because it is in an Iframe the same origin policy applies. You cannot access content cross-domain. It is a security violation.
On Facebook Pages, this is done through the Static FBML app. However, Facebook phased it out on 18 March 2011, but pages using the app before that date (including BobbiBrown) will continue using it.
Related
I'm integrating a Facebook Page feed using the Facebook Page Plugin https://developers.facebook.com/docs/plugins/page-plugin
Although it's working fine for almost all pages, I'm having an issue with one Facebook page. The page plugin is displayed but the feed is empty, no post at all.
The page I'm trying to embed:
https://www.facebook.com/ConnectHearingAsheboro/
The web page where the widget is setup:
https://www.connecthearing.com/hearing-clinics/nc/asheboro/
Publications on the page are correctly displayed when on Facebook site, even when being logged out.
Does somebody have an idea of why would that occur ?
Thanks
This is not a bug, it's a feature
Facebook support answered me here https://developers.facebook.com/bugs/1109206649216632/
The Facebook page I'm using in the widget is sharing posts from its parent Facebook page. The Facebook page widget doesn't include the parent page posts, it's just the way it's been built.
It's a dead end.
I want to embed the #FIFA hashtag which shared on Facbook as an iframae on my webpage ,
I tried using iframe but Facebook doesn't support iframes.
also using JSON output
https://graph.facebook.com/search?q=%23fifa&access_token=CAAA....
but the access_token expires after one hour.
Please advice me how to proceed to add dynamic web page for displaying #fifa hashtag shares on my site like Twitter widget.
I tried to add more than one twitter and facebook accounts from my page via omniauth in rails.
Twitter working fine using force_login parameter.
But, facebook not supporting this.
i can add only one facebook account using /auth/facebook. After i tried to add new facebook account using /auth/facebook path then it returns to my home page only.
If i browse www.facebook.com in same browser then the login page not appearing. The lastly added facebook account page is opening.
when i logout from facebook in browser then i tried /auth/facebook path. its working fine.
So,
need to logout already opened facebook accounts in browser tabs, before i hit add facebook link in my page.
Can anyone help?
thanks.
by deafult, you cannot log in multiple facebook account within one browser unless you have a method to trigger browser(like private browsing-mozilla, incognito Window-chrome ) to let your user sign in. websites uses cookies to track their status.
however, facebook do provide auth_type=reauthenticate.
which the doc is here.
https://developers.facebook.com/docs/howtos/login/client-side-re-auth/
Any correct me if im wrong.
I would like a javascript bookmarklet that will "click" on the facebook "like" button on my web site. Its for an automated program so it can automatically have that user like the home page of my program.
Is this possible?
This is going to be impossible due to the Single Origin Policy that will not allow you to simulate a click in an iframe that does not belong to your domain (or make a cross-domain request to Facebook, for that matter).
And thank Goodness! What you are trying to do sounds like something Facebook (or any other provider of such buttons) would want to prevent.
Our site allows users to register using Facebook Connect. We also have a Facebook page. We'd like to include the "Connect with Facebook" button in our page so a user could instantly connect (aka register) and then be forwarded on to their account on our site.
I was hoping to use the Static FBML page application and the FBML iFrame tag to simply embed the button but it looks like the iFrame tag isn't allowed in Facebook pages. Facebook Connect uses JavaScript so I'm wondering if there is some kind of trick I could use like popping up a page in a new window that would automatically display the connect dialog box.
Any ideas on how I would include a Facebook Connect button on our Facebook page would awesome!
Thanks in advance for your help.
I think the best method would just be a link back to your site (you could even use the Facebook Connect image as the link) to a custom page that triggers the FB.connect javascript that's needed.
Check here for info about FB.connect.requireSession().