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

Question About RSS Feeds

Discussion in 'XenForo Questions and Support' started by ddmmh, Jun 8, 2011.

  1. ddmmh

    ddmmh Well-Known Member

    Hey Guys,

    I use RSS feeds to post to my twitter and now to my facebook page.

    Just wondering if there is a way to change a forum's feed so that it displays the image inside the post and not the avatar.

    As you can see my site is mainly news @ mmazone.com.au

    All my news has photos. Is there a way I can change the feed to show the photos like the following example? Cheers

    Example - http://feeds.feedburner.com/mmajunkie?format=xml
     
  2. ddmmh

    ddmmh Well-Known Member

    bump :p
     
  3. Mike

    Mike XenForo Developer Staff Member

    If you take out the open graph tags from the thread_view template, then it may be possible to use an image from the first post - but it'll likely choose a different image (such as your main logo). You'd have to experiment.
     
    ddmmh likes this.
  4. ddmmh

    ddmmh Well-Known Member

    Hi Mike,

    Tried removing the following but it didnt change anything on FB or twitter. If you have any other suggestions that would be great, thanks mate.

    Code:
    <xen:container var="$head.openGraph"><xen:include template="open_graph_meta">
            <xen:set var="$url">{xen:link 'canonical:threads', $thread}</xen:set>
            <xen:set var="$title">{$thread.title}</xen:set>
            <xen:set var="$avatar">{xen:helper avatar, $thread, m, 0, 1}</xen:set>
        </xen:include></xen:container>
     
  5. Mike

    Mike XenForo Developer Staff Member

    Well, our RSS feeds don't include any details like images, so it's really down to how FB wants to pick it up. Can you show some examples?
     
  6. ddmmh

    ddmmh Well-Known Member

    Its mainly just facebook that I want the photos/images to show up in, instead of my avatar or site(page) logo. Twitter is fine how it is.

    Below is what my facebook looks like now. The top post was the one submitted after removing the opengraph tags. FYI I dont think it matters but I use twitterfeed to submit the RSS feed to my twiter and FB(Page) automatically.

    FB.png
     
  7. Mike

    Mike XenForo Developer Staff Member

    I doubt there's any way it can be done, unless you keep the tags removed and share the page manually, via FB's interface directly (as that should give you the option to select an image).
     
  8. ddmmh

    ddmmh Well-Known Member

    Ahh I see.

    No problem, thanks Mike
     
  9. ddmmh

    ddmmh Well-Known Member

    Hi Mike,

    Sorry to quote you, needed to get your attention somehow :p.

    Ive still been playing with this a little bit. I removed the open graph tags again and like you said, posting it manually lets me add a post to my page with a nice little photo to go with it. One small issue though, the image only shows up when its embedded and not attached/uploaded. If I, for example, create a thread and attach an image and use that image as a sort of 'header' for that thread, FB wont recognise it. When I embed an image from another site or even from my own site then FB recognises the image and I have the option to select it as a thumbnail for the FB post. I assume this is because of how XF embeds the URL of an attachment? I think XF does it this way for security(stop hotlinking) or maybe thats how XF handles attachments?? I wouldnt know. I am just wondering if theres any way around this so I can create threads and attach images without having to upload them to my server everytime. Cheers Mike
     
  10. Brogan

    Brogan XenForo Moderator Staff Member

    The attachments directory is php protected.

    Do you allow guests to view attachments or not?

    I haven't tested what you're doing but you may need to do that in order for any attached images to be used in this manner.
     
  11. Mike

    Mike XenForo Developer Staff Member

    It might just be related to your attachment permissions, in the case that guests can't view (full size) attachments.

    But unfortunately, we're really at the mercy of Facebook here. I don't know what their matching algorithm is.
     
  12. ddmmh

    ddmmh Well-Known Member

    Thanks guys, I didnt even think of that. I do have attachment permissions off for guests. I just enabled them and tried some posts that I never used before on FB(just incase they were cached) but no such luck :(

    I guess there's no way around this then guys?
     
  13. Mike

    Mike XenForo Developer Staff Member

    Unfortunately this is governed by Facebook, so they may be doing something like only getting URLs that match a particular format, so you may be out of luck.
     
  14. ddmmh

    ddmmh Well-Known Member

    Ah well. Close enough for now I guess. Thanks Mike
     

Share This Page