Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Michael Hyldsgaard 64 posts 124 karma points
    Sep 08, 2011 @ 14:37
    Michael Hyldsgaard
    0

    Post to Facebook?

    Anybody knows of an easy way to post to Facebook from Umbraco?

    Best regards,
    Michael Hyldsgaard

  • Euan Rae 105 posts 135 karma points
    Sep 08, 2011 @ 15:28
    Euan Rae
    0

    Can you please give some more details?

    e.g. Do you mean that when a user publishes some content in the umbraco back end, it then posts the data to facebook as a status?

    Or giving customers who view your website the ability to share pages on your website?

  • Michael Hyldsgaard 64 posts 124 karma points
    Sep 08, 2011 @ 15:40
    Michael Hyldsgaard
    0

    > Do you mean that when a user publishes some content in the umbraco back end, it then posts the data to facebook as a status? 

    Exactly...

  • Nik Wahlberg 639 posts 1237 karma points MVP
    Sep 08, 2011 @ 15:50
    Nik Wahlberg
    0

    HI Micahel, I belive you would need to roll your own provider for this using Outh2. We just did somehting similar for a non-Umbraco project. OAuth2 is stil in beta, so we found some instabilities with the implementation, but that's all Facebook supports for the Java/Spring framework. 

    -- Nik

  • Euan Rae 105 posts 135 karma points
    Sep 08, 2011 @ 15:55
    Euan Rae
    0

    It would depend on whether the facebook API allows you to do this, but from the umbraco side you could use something like this

     

    using System;

    using umbraco.BusinessLogic;

    using umbraco.cms.presentation.Trees;

     

    namespace MyNamespace

    {

       public class FacebookPostEvent : ApplicationBase

        {

            /// <summary>

            /// Wire up the event handler

            /// </summary>

            public FacebookPostEvent()

            {

                BaseContentTree.AfterPublish += new BaseTree.AfterPublishEventHandler(BaseContentTree_AfterPublish);

            }

     

            void BaseContentTree_AfterPublish(Document sender, umbraco.cms.businesslogic.PublishEventArgs e)

            {

                // Put code in here to post to facebook

            }

        }

    }

     

    This will catch the umbraco publish, from here you can use the PublishEventArgs object to check for appropriate docTypes etc.

    As I said before, it depends on what the facebook API allows you to do.

    Hope this helps!

  • Governor Technology 146 posts 551 karma points
    Nov 21, 2014 @ 15:23
    Governor Technology
    0

    Hi

    I know this is an old thread, but in case someone is looking for a (partly) solution to this, uShare is a package that currently shares to Facebook, Linkedin and Twitter from the backoffice. It's using OAuth as suggested above. It's main limitation though is that the actual text being shared is constructed from the Umbraco page name and URL. However if this needs to be customised, the source is available and should hopefully provide a good starting point.

    Find it at Our or CodePlex.

    Regards,

    Rigardt

Please Sign in or register to post replies

Write your reply to:

Draft