Like button that opens Facebook app - javascript

I know it is not possible to directly like something through any Facebook API, but since I can create a like-button on my website that the user can click, is it possible to create a like button that likes a page through the iOS facebook App?
I know you can include the functionality to like using the facebook app if you are developing iOS apps, but is it possible (using javascript?) to make a "like" button that likes through the facebook app, instead of through the browser?

It is not possible to force a like trough the facebook app, it still needs a second interaction of the user (a press on the like button).
A workaround would be to let the user like your page trough the webbrowser and after the like has been processed you redirect the user to the facebook app.
Read more about the events of a like button here:
https://developers.facebook.com/docs/reference/javascript/FB.Event.subscribe/v2.4

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

Facebook Feed Dialog simplified?

I'm trying to add a share button or "feed dialog" as Facebook now seem to be pushing, to posts on my website. I'm basically looking for a way to simply allow users to click the button and be sent to the share preview page to post to their timeline or a friend's timeline etc.
The problem is that I don't really need an app (or at least I don't see the need in an app) and I'd like to avoid using their deprecated sharer url method.
What are my options? Can I use the feed dialog method without creating an app? I've tried going through their documentation but it just confuses me.
I'm not fussed whether it's JavaScript that opens a popup or if it redirects to a separate page (provided a redirect url can be provided to return users to the original page on my website).
you definitely need an app for the FB.ui feed dialog, but the user does not have to be logged in. Without an app, you can either use the sharer.php in a javascript popup, or you can use a like and/or send button. Just make sure to include Open Graph metadata in your page.
https://developers.facebook.com/docs/reference/plugins/send/
Be aware that you should also use an app (id) with the like or send button.

How to logout facebook - using code in rails application (Ruby on Rails Omniauth)

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.

How to close a childbrowser in Phonegap build application of Android

I have built an Android application using PhoneGap and for tweeting I have used the ChildBrowser Plugin and now when I hit my tweet button I am able to tweet my post. Now the problem is after that the twitter mobile website gets open and I'm unable to go back to my application.
What I want is as soon as I post, I should get a back button on the childbrowser onclicking which childbrowser gets closed and i get redirected to my application....
I have used this function
window.plugins.childBrowser.showWebPage('http://twitter.com/home?status=\'abcdefg\'');
window.plugins.childBrowser.onLocationChange=TwitterLocationChanged;
window.plugins.childBrowser.onClose=TwitterClosed;
window.plugins.childBrowser.showWebPage(TwitterUrl,{showLocationBar:true});
I use these three methods with the ChildBrowser plugin. It really enhances the control for the app. I can grab the URL from the browser and parse it. This is useful especially for Twitter Integration where I can load the message just tweeted and save it to a database.
You can also modify the .java file and hide the 'prev' and 'next' buttons, so that the user only sees the 'Exit' button. This will return the user to your app (quiet simply the ChildBrowser disappears) but you have a history of the URLs that were visited during that session, and with the QueryString data you can analyse some of how the user interacted.
I don't think its possible. When you open another page on a different domain, you have no more control over it. the users has to exit buy them self

Embedding Facebook Connect In A Facebook Page

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().

Categories