I am connecting to the Facebook API using HybridAuth on the server side (backend is written in PHP). This is for a SaaS publishing application that is hosted on our servers. I understand the mechanics of OAuth and that once I accquire the appropriate permissions from the user, I can write and read from the Open Graph API, which in theory will allow me to do almost anything.
The problem is that I would like to use some of Facebook's social plugins. In particular, I would like to implement the like button so that it automatically appears for each blog post, article and page.
The problem is that the like button and the various Facebook plugins require an app_id. I would prefer not requiring users to add the developer app to their account and creating an app to get an app_id as it can be a confusing process for non-developers.
Is there anyway we can create or retrieve an app_id from open graph (which we can store and use to generate the like buttons and other facebook widgets)?
With the migrations, I understand that each liked URL will not have it's own page. Once the user clicks a like button on your site, he automatically likes your page. However, let's say I have a page called http://www.mystore.com/products/some-awesome-product and there are other similiar pages, all with a like button. Is it possible that when clicking like, the user automatically likes our Facebook page, but when an item is published in their news feed for the like, the URL links to that specific product? Effectively, is there a way for users to like multiple pages from my site?
Update: It looks like we can generate app_ids programmatically with the create application API in the legacy REST API. However, this does not seem to be an option with the graph API.
Seems like we cannot programatically create an app_id for an account. This is not an issue, as we will just create a small guide to guide our users through creating an app and submitting the app_id to us using a form. Not perfect, but should be easy to implement.
As for URLs, liking something will not automatically like your Facebook page. If href is blank, the current page will be liked. If you set your facebook page in the href parameter, then your facebook page will be liked.
Related
I have a website where users can post jobs for free. How can I link these posts to a facebook page about this website? I don't want the users to login to fb.
At this moment I post them to twitter and then using selective tweets to post them on my page. But selective tweets is not able to post logo's specific for that job.
I created a fb app. Did not select anything just gave it a name and got an appID and appSecret. I dont now what to select in "Select how your app integrates with Facebook". Becouse it is not a mobile app and it is not a website with fb login.
Kind regards.
you can use share on facebook facility of facebook ,from http://developer.facebook.com.
you can easily add this to your website.
have fun!
You can do this easily via MYSQL and PHP, depending on how your current site is setup. What i would do is store the jobs into a separate table while saving, like this
(table) Facebook
pageid //numerical value
header //job title
message //job description
So that you can use it for the next part.
Create an application via Facebook and give it authentication to users and your Facebook page.
by adding this application to your page you can then call something like :
$facebook->set_user($user, $session_key);
$facebook->api_client->stream_publish($item['header'], $item['message'], $item['pageid']);
Using your keys from facebook.
Then you can run a Cron that updates every x minutes, and after it has posted it, in an array, you can clear the table for the next row of jobs.
Let me know where you are on this and ill try to help as much as possible.
We are developing a facebook iframe application that pulls some images (via an API) to the current user album (creates a new one).
The user views his newly uploaded album photos using a facebook lightbox clone. In this clone he must be able to comment and like the current viewed photo.
Is there a way to provide facebook comments & like to these pictures without the use of the Graph API (which would require us to replicate a lot of visuals).
Another try was the social plug-ins with the facebook photo url given but no success.
Any ideas?
I would recommend using the social plugins that facebook provide.
For the likes and comments you can specify a URL in the plugin code, that URL should be the URL of the photo relative to your app e.g. http://myapp.com/photo/123 and not the http://app.facebook.com address.
Facebook will need to be able to crawl that URL so if you are checking if the user is logged in via PHP then you should either disable this if the user agent contains facebookexternalhit or show a different page for that user agent. It doesn't matter about the content, just set a couple of og: meta tags and that should be fine.
Built a custom app that will allow users to add jobs to a system. Once they've done that, it should post to their profile pages as well as their news feed. All of this is working perfect, except for one bit. If somebody else clicks on that link, let's say a friend of the person who has posted the link (from the system when adding a job) they're asked to install the app.
What should happen is a new tab should open with that position showing. If you use facebook like / recommend, this works, but requires the user to do it manually. When using the custom facebook app to do it via /user_id/feed, POST it shows the link and everything working fine, till one of their friends clicks on the link and is then requested to install the app.
How can I make so that the link being posted on the fan page, profile page of the user who has given permission to the app to do so, to just open in a new tab and go directly to the link that was posted instead of routing through the app?
Just to add on to this, the url that get's created via the app looks like this : http://www.facebook.com/connect/uiserver.php?app_id=142332219213134&method=permissions.request&redirect_uri=[the actual url being passed]&response_type=code&display=async&auth_referral=1
This makes that you HAVE to install the app to view the links... which should not happen, you should just be taken straight to the link that was shared via the app.
It looks like you probably have Authenticated Referrals enabled. I haven't worked with this feature but it sounds like it's related to your problem based on that URL.
https://developers.facebook.com/docs/opengraph/authentication/#referrals
I had a movie related forum in my website. There is a commenting system for each movie and artist. Simply users can add comments.
Now I would likes to implement facebook commenting system to my application . My little worry is how to implement all these two ( fb and my own system )?
Also I had a doubt ..
If I put / share the link on this site on the facebook and assumes that users commented inside facebook .. Then there is any option to print that comments in my web site in that page?
Facebook comments is a social plugin that could be embedded in your web page. Specifically it's implemented inside an iframe. Since that iframe is implemented on facebook so you don't need to worry about how to generate the content. Although it looks like appear in your web page.
However if you do need to access the comments data (programmatically), you could retrieve the comments via facebook graph api: https://graph.facebook.com/comments/?ids={YOUR_URL}. You can also subscribe facebook events to get aware when someone has commented on your movie.
Ref:
facebook comments plugin: https://developers.facebook.com/docs/reference/plugins/comments/
facebook event subscription: http://developers.facebook.com/docs/reference/javascript/FB.Event.subscribe/
I have made a website on which a user has to log in using a username and password. I have seen these in so many website, we can connect through facebook account. And I want to add the same to my web site. How is it possible,using php sdk or the javascript sdk?
The team at Facebook has spent considerable time documenting this, I would suggest you start there:
http://developers.facebook.com/docs/guides/web#login
http://developers.facebook.com/docs/authentication/
If possible, I would do like dracolytch writes here and create a level of abstraction for both OpenID and Facebook. He is willing to share his code.
Those links are what Facebook likes to call "Badges." Go to your profile. Scroll all the way to the bottom. On the lower left hand column you should see a link that says "Create Profile Badge." Click that. From there you can edit a Badge to show the info you'd like. At the end, it will give you some html code that you can copy and paste into another website or blog. When people click on your Badge, they will get sent directly to your Facebook info box.
Source(s):
http://www.facebook.com/badges.php