1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Facebook / Notification Integration

Discussion in 'XenForo Questions and Support' started by m0o0oeh, Apr 3, 2013.

  1. m0o0oeh

    m0o0oeh Member

    Hi there, been a licence owner pretty much since xF came out of beta, but have been pretty silent, due to issues with life, the universe and all that jazz.

    Anyway, the reason I'm posting here is to ask a few questions on behalf of a group I belong to, who are considering moving from several facebook groups, to one dedicated forum, but there is a lot of opposition from people who don't want to leave facebook, because of the convenience of the way the groups etc work with the existing notification system facebook have set up.

    One member asked about the possibility of a forum notification being shown in Facebook, (which I think kinda defeats the whole point, but I said I'd ask,) either by means of an app in facebook, or some coding jiggery pokery.

    Any suggestions at this point would be gratefully received.
  2. Jeremy

    Jeremy Well-Known Member

    It looks as if Facebook has a beta API for sending notifications:


    It doesn't look two difficult to create an application that these users would become users of and give permissions (might be able to go with the facebook integration already available), and send alerts on specific events. What alerts do they want sent?
  3. RoldanLT

    RoldanLT Well-Known Member

    Good point.. I'll look into this.
  4. m0o0oeh

    m0o0oeh Member

    KingKovifor: They're looking at getting notifications sent to facebook when someone replies to their thread, or a thread that they've commented on, much like the existing group setup does on Facebook. I'm no coder, so I have no idea how to implement such things.
  5. Jeremy

    Jeremy Well-Known Member

    The easiest set up I can see:
    - Auto-watch threads that people have posted in and/or replied to.
    - Override the notifications setting to include Facebook integration and send notifications.
    - Either disable notifications on XenForo for watched resources (completely take over and don't send them) or have duplicate notifications (I'd go duplicate just so if they are already browsing the forum, they still get notified). Or, go a little more complicated and look at user activity and only send duplicates to facebook if they aren't logged in.

    I'd have to look into a what information XenForo stores so you can do things like:
    It shouldn't be too difficult.
  6. m0o0oeh

    m0o0oeh Member

    If you wouldn't mind, I would be most grateful :)
  7. Jeremy

    Jeremy Well-Known Member

    It appears as if Facebook integration only stores facebook_auth_id, which isn't what we'd need to access certain features. What I see being needed is:
    • Upon registration (or post registration), when associating a user, access the User Graph API.
    • Grab & Store at least the id property / field.
    Then depending on what you'd like to do, perform the following using the Notifications API on...
    • Reply to a thread (check to see if user has posted in it)
    • Posts a new thread to the forum
    • Integrated with an add-on such as [bd] tag me to facilitate bringing users into the conversation
    If you'd like to, you may contact me through PC about it.
  8. DRE

    DRE Well-Known Member

    *PMd. I know oxy would love this too.
    0xym0r0n likes this.
  9. MegaFora

    MegaFora Member

    I'm looking into doing this too - what I've found so far is that only "canvas" apps (ie apps that appear within facebook itself rather than on an external site) can send notifications now, since a policy change.
    To make a forum into a canvas app would involve running it in an iFrame. To do that, facebook needs to see an https address, so you'd need a security certificate (i assume one of the cheap low-level ones would do).
    I'm working through this process now, and I'll let everyone know how it goes.
  10. Jeremy

    Jeremy Well-Known Member

    If it needs canvas, @Mike Edge looked at it a long time ago.
  11. Da Bookie Mon

    Da Bookie Mon Well-Known Member

    Correct, for the automatic push, it needs to either be within canvas. I been working on this here and there to submit xF Arcade scores to the players timeline. The thing you have to be the most careful about with automated pushing is, doing it often, it is easy to get your app flagged for spam.
  12. MegaFora

    MegaFora Member

    According to the facebook developers page, as long as you have either a 17% click rate on your notifications, or under 50,000 notifications, you'll be ok.
    I've had a look at this thread and it looks like running XF in an iframe is possible.
    @Mike Edge , are there any other difficulties you ran into with this, or is it basically fine as long as the notifications stay within the numbers above?
  13. Claudio

    Claudio Well-Known Member

    What happened that this amazing thread has no activity since last year??
    Last edited: Sep 5, 2014
  14. Claudio

    Claudio Well-Known Member

    Do you have any news on this Mike? This will definitely be a great addon and I have no problem to pay for it :)

Share This Page