Integration of facebook to a CMS - facebook

I am currently creating a CMS for internal use. We currently have a situation where we post something on our Facebook page, and then have to copy and paste it on to our corporate website.
The thought process is now to try and use a in house built CMS to drive both the website and FB. My initial thought process is that there will need to be to way flow, i.e We need to be able to sync Facebook with our website database, but also our database with Facebook. This should not be a problem, with the Facebook-SDK I have successfully retrieved posts, links, statuses, photos we have posted to Facebook.
My problem comes in that it would be great if I could some how replicate the notification of Facebook, so that if someone likes a post on Facebook, we get a notification in the CMS also, is this possible? Can you pull notifications from Facebook?
Other points I need to consider is can I create a gallery of images on my website, and send those to Facebook to create a new gallery? Can I pull comments from facebook, show them on my site, and allow people to add to them through a comment form, but send those comments to facebook also?
Any body any experience of trying to drive facebook from an external source?

How about using iframes? It's easy to use, you only have to be logged in on facebook. I'd do something like this:
<iframe src="http://www.facebook.com/your-site-here" class="cms_block"></iframe>
You just have to look into your global.css file, what kind of class is to your cms blocks associated with. Or define it manually:
<iframe src="http://www.facebook.com/your-site-here" style="display: block; width=: inherit; height: inherit;"></iframe>

I don't think you are going to find the solution in the Facebook APIs so you'll probably need to code something yourself. You could poll the Facebook feed and send notifications when you detect them.
You might want to check out https://ifttt.com/wtf - not sure if they will be as granular as you want (to notify post 'likes') but there are various FB events you can monitor and act on. Check out some of their public recipes: https://ifttt.com/recipes/1789-tweet-my-facebook-status-updates.
I've been working on a somewhat similar problem and decided to maintain FB as CMS and pull the feeds from FB into my site rather than try to keep the two systems in sync.
Good luck and post back how you solved if you get a chance!

Related

Get the post feed of a public facebook page

I'm working on an app and I need to pull in the public posts from the page of a business. I do not want users to login or send any information back to Facebook, I just need the posts so they can be shown in a read-only format.
I've looked around and from what I've read, Facebook offers ways to authenticate your connection to the API, but for security reasons you shouldn't make the calls directly from your app. I've seen something called a client token mentioned, that is assumed to be insecure, but I can't find much mention of it outside of https://developers.facebook.com/docs/facebook-login/access-tokens. It says it can be found in the app dashboard, but I have not been able to find it.
How do you make a call to get the posts of a public facebook page from an iOS app?
I ended up finding something that wasn't quite what I was looking for, but still got the job done: Facebook Page Plugin
It lets you embed the publicly available feed of a Facebook page into a web page. If you want to use it in an app you can host the web page that has the feed code in it and then load it into a web view in the app.

Is a third party website allowed to post messages on facebook, on behalf of another site?

So here's my use case:
A user sees a cool product on a shopping website (sample-shopping-site.com)
They want to share this product with their friends on facebook
They however want to pass the information to an intermediary site (a-sharing-app.com - that i'm trying to develop), that posts to facebook on my behalf.
My questions:
Is this even allowed by facebook? i.e. can a-sharing-app.com put a widget on sample-shopping-site.com, so that a person visiting sample-shopping-site.com can share on facebook via a-sharing-app.com?
If yes, could you point me to helpful bits on the facebook developers API page?
Just want to clarify: the APIs and most questions/examples on the internet point towards sharing directly from sample-shopping-site.com to facebook, by registering sample-shopping-site.com as an App with facebook.
I however want to register a-sharing-app.com as an App, and then putting a widget of a-sharing-app.com on any page (such as sample-shopping-site.com) allows me to share on facebook by passing information to a-sharing-app.com
As far as I know there is no Facebook guidelines that restrict what you want to achieve, so I may safely say that yes, you can create an app so that a person visiting sample-shopping-site.com can share on facebook via a-sharing-app.com . I can even mention a well know service that is doing the same, Disqus.
How you can implement this feature is a little up to you but may I suggest what Disqus or apps like it are doing is, they use the JavaScript API of Facebook to integrate and are mostly enabled within an iframe that loads content from their domain. The exchange of information between sample-shopping-site.com and a-sharing-app.com is done by the JavaScript loader which loads the necessary iframe then. The other things you would like to check would be Dialogs which you may use for different cases, or you may do it on your own using the FB.api and make API calls to the Graph API for sharing data.

How to merge comment stream on Facebook events and my own website

I have a website that allows people to post events and it automatically posts their events to facebook if they so choose. I also integrated facebook comments on the event pages on my website.
Is it possible to merge the comments that people leave on my website's event pages with the comments that people leave on the facebook event page that was automatically made for them? I can't seem to find any documentation on this.
Edit: Just to clarify: The comments on my website are done via the facebook-comments API, they are not a module of my application.
Adding a separate answer, as after clarification it's significantly different.
If you want to basically have the wall of your event show up on your website, you can use the Event API to pull in wallposts and display them. To be able to post to that wall, you would have to do some custom coding to authenticate the user with publish_stream permission and then have a form on your site that would post to the event's wall, as noted in the post section of the above link.
Someone may have done this already and put code out there, but I doubt there is an easier way to get your ideal situation up and running. This use case isn't as automagic as the comments box, unfortunately.
If you're just looking to spread your events socially, however, the comments box will post to the commenters' walls with a link to your event page, which can then in turn point them to the Faecbook event. You might be able to use the Facebook event's URL as the URL for your comment box on the website, so it would just post a link directly to the Facebook event, but I'm not sure on that one.
I looked at this in my app, and we ended up deciding to just maintain separate streams. This is because it's only a one-way integration - you can get comments from Facebook via the Graph API and format them on your own website, in-line with your website comments, but there's no way to push comments from your website up to Facebook.
You could, if you wanted, just use the Facebook comment form for all comments - this has been done by big sites such as TechCrunch, and is effective, but it requires users to have a Facebook, AOL, Yahoo, or Hotmail account. Whether you want to do that or not depends on your preferences and userbase.
there a tool that combines comments form different pages or different sources
Check https://feedgun.com which works on pulling comments from different sources like YouTube videos, existing wordpress sites, facebook comments plugins and even DIsqus account and combine them all together and publish them on any of your webpages, and it all works automatically once you set them where to pull and where to publish.

Simple Facebook Integration

I want to integrate a friends website (photographer) with Facebook. I've been trying to find the answer in the Facebook Developers guide, but it doesn't seem clear to me.
What would I need if:
I want to have a like button per photo album he has
I want to publish his news that he enters in my cms to his facebook wall
Do I need an application? Or can I accomplish this with plugins?
Thanks in advance.
the like button can just be added by inserting a code snipped
facebook will take care of the rest.
if you however want to do more with your liked pages like send updates and have statistics, you need to register an app and supply the app id as meta tag in your website. the open graph notation is used.
to publish news post you can obtain a permament token and publish using the graph api, but there are also alternative and probably easier methods
You should keep it simple and be able to accomplish these with just plugins... FB's documentation is quite rich:
In here it explains how to add the like button:
http://developers.facebook.com/docs/guides/web
http://developers.facebook.com/docs/reference/plugins/like
And this to post to his wall:
http://developers.facebook.com/docs/reference/plugins/live-stream

Hiding application source when posting to Facebook fan page via graph API

I've successfully posted to a fan page as the actual page via the Graph API.
The problem is that the post says it was posted at "time via application name". Is there any way to hide this, so my post looks exactly as if I typed it directly into Facebook?
I'm building a messaging center that can easily deliver messages on many different channels, Facebook being one of them. Clients probably won't appreciate their Facebook posts linking to my application, nor do I want to set up a new Facebook application for each client.
There is no way to disable this. It is an internal Facebook system and is very deliberate on their part to show users where content comes from and make it easier to report malicious and spammy apps.