Hi - my client wants to be able to publish events and articles, when pubished via the Umbraco admin to designated facebook groups (it could be to 1 group or many), I have already looked through the forums but I do not think this has been answered yet.
Just bumping this old topic, because i am facing the exact same problem. The ability to send a message to a facebook group wall when creating a new event.
This is doable. I've done stuff where you can share links to stuff to Facebook/LinkedIn/Twitter/G+ etc from the Umbraco back office. Facebook provides an API that you can use to interact with your/other people's Facebook pages. Basically you need to:
- create a Facebook app
- authorize it to your Facebook account
- create some code that uses your app credentials to post events using the Facebook API
It's not for the faint of heart, getting used to the APIs, and in particular the authentication apsect can be a bit of a headache if you've never used OAUTH before. Twitter is the easiest social media platform to integrate with, Facebook is somewhere in the middle in terms of complexity (integrating with LinkedIn is PAINFUL). You need to read the Facebook API docs to get an overview of how it works: http://developers.facebook.com/docs/reference/api/#publishing
Well, i guess there is no way around getting my hands dirty :p
I was just checking to see if there was some sort of ready-made modules/plug-ins but looks like this is the only way.
Looks like there is no other way than diving in head-first.
Thank you :)
EDIT:
Ok one question then: Creating some sort of c# code that interacts with facebook shouldnt pose that much a problem. The problem i can think of right now, is how to wire it up with umbraco? As in, when for example a new news node, or event node is created, how does umbraco know when to fire off a notification to facebook? Trigger the code that interacts with their API?
You can trigger the event using the Document API. You need to attach an event on Document (probably OnPublish, as that'll be guarantee that the page is there to link to). In the event you can check the DocType of the Document being saved and then if it's an Event you can run your code to post it to Facebook. You may need to add some code to check if the event already exists and update the event rather than add as a new one too (as a page can be published multiple times).
For the events stuff, assuming you're using 4.7.x, here's some useful links on using the events model:
The second one has some examples of checking for a specific document type on publsih, which should be exactly what you're after! If you get stuck with the Facebook API stuff, let me know, and I'll try and dig out the bookmarks that I used (although they may not be that up to date now).
I am still a little unsure on how to do this, is there a simple tutorial on how to set something like this up? Need to start somewhere.
Also, i was a little unclear, when i mentioned "event" it was just an name for a node, as in "meeting on friday at 7" event. But i guess you got that and the solution is also called events so i might just be confusing myself.
Either way, i think i know what i must do now, but first things first, and thats learning how to use the api and getting some code in that triggers on publish.
If anyone is still interested in this, we've released uShare which allows you to share a basic Umbraco page name and URL from the backoffice to Facebook, LinkedIn and Twitter. The original question was slightly different, but feel free to download the source which should include all the various pieces as mentioned above (i.e. setting up the social provider applications, using OAuth in the backoffice to authorise Umbraco to share on your behalf, and using the various APIs to do the actual sharing). Hopefully this would help anyone looking to integrate with any of these or build on top of uShare for extra flexibility.
Posting articles / events to facebook groups
Hi - my client wants to be able to publish events and articles, when pubished via the Umbraco admin to designated facebook groups (it could be to 1 group or many), I have already looked through the forums but I do not think this has been answered yet.
Anyone have any ideas?
Thanks
Just bumping this old topic, because i am facing the exact same problem. The ability to send a message to a facebook group wall when creating a new event.
This is doable. I've done stuff where you can share links to stuff to Facebook/LinkedIn/Twitter/G+ etc from the Umbraco back office. Facebook provides an API that you can use to interact with your/other people's Facebook pages. Basically you need to:
- create a Facebook app
- authorize it to your Facebook account
- create some code that uses your app credentials to post events using the Facebook API
It's not for the faint of heart, getting used to the APIs, and in particular the authentication apsect can be a bit of a headache if you've never used OAUTH before. Twitter is the easiest social media platform to integrate with, Facebook is somewhere in the middle in terms of complexity (integrating with LinkedIn is PAINFUL). You need to read the Facebook API docs to get an overview of how it works: http://developers.facebook.com/docs/reference/api/#publishing
Hope that helps!
:)
Thank you for the reply.
Well, i guess there is no way around getting my hands dirty :p
I was just checking to see if there was some sort of ready-made modules/plug-ins but looks like this is the only way.
Looks like there is no other way than diving in head-first.
Thank you :)
EDIT:
Ok one question then: Creating some sort of c# code that interacts with facebook shouldnt pose that much a problem. The problem i can think of right now, is how to wire it up with umbraco? As in, when for example a new news node, or event node is created, how does umbraco know when to fire off a notification to facebook? Trigger the code that interacts with their API?
You can trigger the event using the Document API. You need to attach an event on Document (probably OnPublish, as that'll be guarantee that the page is there to link to). In the event you can check the DocType of the Document being saved and then if it's an Event you can run your code to post it to Facebook. You may need to add some code to check if the event already exists and update the event rather than add as a new one too (as a page can be published multiple times).
For the events stuff, assuming you're using 4.7.x, here's some useful links on using the events model:
http://our.umbraco.org/wiki/reference/api-cheatsheet/using-applicationbase-to-register-events/overview-of-all-events
http://our.umbraco.org/wiki/reference/api-cheatsheet/using-applicationbase-to-register-events/event-examples
The second one has some examples of checking for a specific document type on publsih, which should be exactly what you're after! If you get stuck with the Facebook API stuff, let me know, and I'll try and dig out the bookmarks that I used (although they may not be that up to date now).
Thank you for your reply.
I am still a little unsure on how to do this, is there a simple tutorial on how to set something like this up? Need to start somewhere.
Also, i was a little unclear, when i mentioned "event" it was just an name for a node, as in "meeting on friday at 7" event. But i guess you got that and the solution is also called events so i might just be confusing myself.
Either way, i think i know what i must do now, but first things first, and thats learning how to use the api and getting some code in that triggers on publish.
Any news/updates on this topic? :)
Hi all
If anyone is still interested in this, we've released uShare which allows you to share a basic Umbraco page name and URL from the backoffice to Facebook, LinkedIn and Twitter. The original question was slightly different, but feel free to download the source which should include all the various pieces as mentioned above (i.e. setting up the social provider applications, using OAuth in the backoffice to authorise Umbraco to share on your behalf, and using the various APIs to do the actual sharing). Hopefully this would help anyone looking to integrate with any of these or build on top of uShare for extra flexibility.
Find it here: Our or CodePlex
Rigardt
is working on a reply...