简体   繁体   中英

Integration of facebook to a CMS

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, ie 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!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM