Facebook Posted Items

(En español abajo) English I’m not using my Facebook account as much as I used to, but one thing I do still use is the Posted Items feature, I added a bookmark to my browser’s toolbar and if I find something worth showing I just click on it, add a little comment and it’s out […]

Facebook Posted Items

95 Comentarios

  1. Buenísimo Fepe, ahora nomás lo instalo :smile:

  2. @Maty!: Gracias :smile: . Después contame cómo te fue, si fue fácil la instalación, etc.

  3. hi. Thanks for plugin

    perfect.

    Regards

  4. @Baron: You’re welcome. Glad you liked it.

  5. Hey, that worked really well! Thanks! It’s nice to install a plug-in that works as advertised. :-)

  6. @Kevin: Yup, I hate those plugins too :p

  7. pongo buenas caras al mal tiempo sonrio mucho por todos los que estan padeciendo un infierno de guerras con ese egoismo de poder este lugar del mundo me recurda siempre que las ciudades son malas consejeras el campo trae lo bueno hay que dejar las metrpolis comprometerse con los mas pobres desde el corazon

  8. quisiera saber especificamente que hace el plugin, yo deseo que desde wordpress se pueda de alguna manera informar a mis amigos de facebook que he publicado un nuevo post en mi sitio web

  9. @s1l4s: Para eso simplemente hay que ir a la parte de notas (notes) de Facebook e importar la URL del feed del sitio. De esa forma, cada vez que se agregue un post al blog, se informa publicándose una nota con el texto.


  10. Alvaro Illanes
    17/01/2009, 22:24

    Hola Felipe, instalé el plugins desde el administrador de plugins del wordpress mu 2.7 beta, se activo sin problemas, por lo tanto, aparece en todos los blogs como opción.

    He procedido a configurar flickr, con mis datos:

    Flickr ID: 27507948@N00
    Display: SET
    items using: 20
    Set: 72157600465665414
    Use number from the set url
    Tags : flickr,artistas,obras,arte,personajes

    Finalmente, he agregado en un cajón de texto el código con las noticias de mis contactos y amigos:
    http://www.facebook.com/feeds/share_friends_posts.php?id=1120932872&key=f1c22f8c94&format=rss20

    … las malas noticias es que no logro ver el resultado…

    http://culturizarte.com/members/admin/flickr

    Saludos
    Alvaro

  11. @Alvaro: Antes que nada, es Fepe, no Felipe 😛

    Ahora sí, hablando del tema, ¿qué tiene que ver Flickr con todo esto? ¿Dónde llamaste a la función:
    <?php
    fb_posted_items ("http://www.facebook.com/feeds/share_friends_posts.php?id=1120932872&key=f1c22f8c94&format=rss20");
    ?>

    ?

    ¿Y no devuelve absolutamente nada o tira error algún error?


  12. Alvaro Illanes
    17/01/2009, 22:54

    jjjJj, Flickr no tiene que ver en absoluto… fue un error de tipeo.

    Lo agregue en un cajon de texto, lado izq a pié de página, http://www.culturizarte.com y tb en un blog internet http://www.culturizarte.com/concepcion

    No me arroja error…

  13. @Alvaro: Según veo lo usás como widget, ¿no?
    Nunca trabajé con ellos, y no sé si cambia algo. ¿Como widget en un blog con WordPress común (no Mu) lo probaste y funcionó?

  14. 😮 ¡Es lo que estaba buscando!
    ¡Muchas gracias por postearlo! 😉

  15. I’m a little confused about how to use the parameters. Where do I put them? For example, if I only wanted to show only one item off the rss feed (instead of 5), what would the code be to do that? Thanks!

  16. @Rich: You’ll have to place this wherever you want it to appear:

    <?php if (function_exists("fb_posted_items")) : ?>
    <h2>Facebook Posted Items</h2>
    <?php fb_posted_items ("http://posted-items-url",1); ?>
    <?php endif; ?>

    The first and last line are not mandatory, but it’s a good thing to do with all your plugins. This way, if you disable it for some reason, your site will still load instead of showing you that the plugin is not enabled.
    And the second line, the one between de h2 tags is just the title, you can change that.

    And, of course, you have to change the text http://posted-items-url for your actual URL, and the number 1 is the amount of items to show.

    I hope I made it a little clearer for you. If you have any other question, go ahead and ask :smile:

  17. That’s EXACTLY what I needed to know! Thank you! This plug-in is exactly what I was looking for. Thanks for all your hard work!

  18. @Rich: Great :smile:
    And thank you for using it

  19. Perfect- Thanks.


  20. Bueno, Ana Maria
    24/03/2009, 20:23

    :roll: Hola, busco a mi amiga que hace muchos años no se nada de ella, eramos de Berazategui, estudiamos en la escuela de Ducilo, viviamos cerca del Cruve de Fcio. Varela. Me gustaria saber algo de ella.Vivio en Neuquen. No se nada mas…

  21. Hie! I tried your method to import my posts I’ve posted in my FB but nothing seems to work, I don’t know, prolly I’ve got the codes all tangled up? In my blog at WordPress, it only shows me this:

    Facebook Posted Items
    ——————————
    Warning: array_slice() expects parameter 1 to be array, null given in /home/lealauri/public_html/blog/wp-content/plugins/fp_fb_posted_items.php on line 31
    ——————————
    No items

    What does it mean?

    Could u help me and reply to me via e-mail pls? Would truly appreciate it. TQ so much in advance!

    Nurlea
    Malaysia

  22. @Nurlea: How did you call the function? Was it something like this:
    <?php
    fb_posted_items ("http://www.facebook.com/feeds/share_friends_posts.php?id=1120932872&key=f1c22f8c94&format=rss20");
    ?>

    ?

    If it wasn’t, please do so (with YOUR Facebook Posted Items’ URL).

    And if it was, please let me know exactly what was the URL inside the fb_posted_items function to check what’s Facebook doing 😛

  23. Dear Fepe,

    Thanks for your reply/ email. Based on your reply, I discovered the following important points/ differences, but I have no idea which is causing this slice_array warning message problem, to be precise.

    So anyways, the points/ differences are:
    1. When calling back the function, I open-up with the «» to close the call back function. I did this, following the «README.txt» file included with the plugin folder.

    2. Instead of using «…facebook.com/feeds/share_posts.php?id=…», I went and used «…facebook.com/feeds/notes.php?id=…» as my URL.

    Does that make a lot of differences? Well, NOW, I’m no so sure. At least, the array_slice warning error message is gone, and in my blog, it displays the 5 recent posted items in my facebook. But now, comes the 2nd problem (I’m SO SO SO sorry to trouble you again…) which is, as I move/ hover the mouse to the displayed links/ posted items, it appears to be linking back to my blog, instead of showing the posted item’s link in Facebook. U get what I mean? If you don’t, you can check out my blog. It’s still there, I left the plugin/ function on eventho clickable but it is not going anywhere near my posted items. But at least, on the brighter side, the titles of the top 5 most recent posts are there now. Hehehe…

    Sorry for this rather long reply but really hope you’d be so kind to assist me again…

  24. Typo: Sorry, I guess I was distracted a bit.

    1. When calling back the function, I opened and closed the «..php
    fb_posted_items («http://www.facebook.com/feeds/share_friends_posts.php?id=1120932872&key=f1c22f8c94&format…» with the «…php if (function_exists(«fb_posted_items»)) :…» codes

    Sorry for the typo again

    PS: I think, what seems to be the Quotation and Apostrophe marks, does make a lot of difference. For instance, the array_slice error appeared again when I used the quotation mark. But just previously, i used an apostrophe mark to open and close the url, everything seems ok. U have any explanations to this? Thanks again… :)

    Muchas gracias!!!

  25. @Nurlea: The thing here is that you are using the notes feed URL, while this plugin is for posted items (now known as links).

    When you post a link, you have a URL to link to, but when you post a note, the only link present is the one going to that particular note, that only your Facebook friends can see.

    If you want to use this for notes (linking to the note on Facebook), let me know and I’ll do the changes needed for that to work.

    It’s pretty easy and there are a few plugins going on for that if you don’t want me to change this one for you, but what I found out was that Posted Items worked differently than notes, so I had to do a few changes here and there to make it work, and after all the work I thought it may help others, so I released it.

    Now, for the apostrophe, quotation dilema, what happens is that the former works everytime, while the latter depends on a few things.

    Basically, if you do this:


    $url="foo";
    <a href="<?=$url;?>">

    It may understand it like this:
    <a href=""foo"">

    So href is equal to nothing and the word foo is on the way and may cause an error.

    I don’t know if that helped at all, but at least let me know if you want me to edit your code or something

    P.S: I made my response even longer than yours so there’s no reason to apologize 😛

  26. Buenos días Fepe!!! (It’s now 10:40am here in Malaysia and my morning couldn’t have been any better!!!… 😀 )

    You’re so, so, SO very kind! And before I get on typing more and more nonsense and making this comment even longer than yours, I might as well say this now…

    «YES PLEASE! I do hope you won’t mind helping me out regarding this exporting my Facebook notes with (maybe) the comments and all, into my blog at WordPress. It would definitely mean a lot to me if you’d be so kind to do the amendments in the plugin codes/ php scripts etc. Just let me know if you wish to know any detail along the way, to expedite and help you out with this task. I will try to be accommodating! :) »

    And now back to the explanations pertaining the differences of notes and posted items, which is now known as LINKS. And thank you for explaning in details regarding the usage of those two symbols. See, I told ya, this is a good morning for me, and it’s all, thanks to you!

    Muchas gracias again!

    Please contact me/ reply/ let me know ya, if I could be of any help regarding my amending-code request ya… :) Cheers!

  27. @Nurlea: Wow, it’s 00:25 now, I’m almost ready to go to bed.

    Well, let’s get down to business. The only thing I need is your notes’ feed URL.

    After that, I’ll send you the plugin for you to use.

    And regarding the comments, sadly Facebook doesn’t let anyone «grab» them out of their site :sad:

    So, send me that URL and as soon as I wake up tomorrow, I’ll get to it and send it right to you inbox.

  28. Dearest Fepe,

    I tot I sensed that one coming, like, FB will not allow comments to get out either. But its good enuff to have the notes published to in my blog so that I could cover back those times I posted notes in FB and while doing so, I’ve abandoned my blog. Its time I get my blogs to feed all those notes I’ve posted in FB. Besides, some readers are not in FB, they’ll get to read in my WP and they’ll do the comments, yes? Hehehe

    Anyways, here’s what u’ve asked for. Now, based from my understandings trying to solve/ figure out this whole issue with posted items, notes, status and stories etc., I would believe this to be my FB’s note feed URL:

    …ww.facebook.com/feeds/notes.php?id=1446321517&viewer=1446321517&key=642d600824&format=rss20…

    Well, I guess I’ll catch up with you later tomorrow. Goodnight and have a good night sleep.

  29. @Nurlea: There’s a little misunderstanding here. What I can «get» from Facebook, is the title, the content and the link to that particular note in Facebook.

    The first thing I thought of doing was giving you a list just like the one my plugin gave you, but with the proper links (the ones going to Facebook).

    But if you want, you can make a WordPress Page, and have there the last notes (both title and note per se). But you won’t get comments per note outside Facebook. You can have comments on that page, which will change (the page, not the comments) everytime you post a note on Facebook.

    So, to wrap it up, you can have it two ways:

    1) On a list:

    Title #10
    Title #9
    Title #8
    Title #7
    Title #6

    With each of the five linking to the note on Facebook

    2) On a separate page

    Title #10
    Body of the note #10

    Title #9
    Body of the note #9

    Now, if you post an eleventh note, the first case, will now show this:
    Title #11
    Title #10
    Title #9
    Title #8
    Title #7

    While the second:

    Title #11
    Body of the note #11

    Title #10
    Body of the note #10

    The first one is much easier on your side, since it’s like this plugin. The second one though, will need a little editing on your part. You’ll have to add a few lines to a .php file on your theme.

    Let me know which (if any) of these you like :smile:

  30. Dear Fepe,

    Thanks for the reply. Was lookin’ forward to it actually, but no worries, no rush. My WordPress is on offline mode anyhow, for upgrading to 2.7.1 version. So no rush, I’m not like rushing and urging to have the codes NOW. Hehehe. But I hope it won’t be too late 😉

    Anyways, would it be much to ask of ya, if you could help me out with the codes for the 2nd type? I’d prefer if ppl can still read the content of the notes in my WP, instead of the first one, they’d be clicking links to my notes in FP right? And if so happens that person is not an FP member, then, the whole thing brings no significant meaning, yes? :) So I’ll opt for the 2nd type, the one with the body of the notes included, if thats ok with you… :)

    Thank you so much ya. I owe you big, big, BIG time… :)

    Thanks!

    Nurlea


  31. The Unhygenius
    04/06/2009, 20:25

    Hi Fepe… only plug in of its kind ive seen! good work.

    it working really well for me, but i have a glitch i though you might be able to help with— im using a stripped down wordpress blog as a news updater for a site… the WP blog is actually inside of an , so when i click a link, the link takes you to the new page, but within that which is only 900 px wide— clipping most webpages.

    is there a way for the links to open up outside the ifram in a new browser window? can i modify the code somehow?

    thanks for making this killer plugin!

    kelcey


  32. The Unhygenius
    04/06/2009, 20:34

    Fepe—

    is it possible to do a plug in like this with posts from facebook? or the news feeds/wall posts from facebook?

    kelcey….

  33. @The Unhygenius: I have a word missing in your first comment, it’s inside of an… ? (an iframe?).
    You can change the plugin so the links have a target="blank" attribute, which will open the link in a new windows. If you want to open it in the same windows there si another way with target, if you want that let me know and I’ll find it, I don’t remember it now.

    And regarding the second comment, what do you mean by posts? The former «posts» are now «links» and that’s what this plugin fetches. If you want notes and such, that’s pretty easy, but the link, of course, will take you to your note’s facebook page, so if you’re not friends with someone who clicks on the link, they won’t see it.
    Unless you set your privacy options on Facebook to let anyone see your notes.

    There are a lot of variables, let me know a little more detail about this one and I’ll be glad to help you.


  34. The Unhygenius
    06/06/2009, 0:52

    thanks for your answer… i made the mistake of embedding html into the comment, so what i meant was— an IFRAME…. i have the WP Blog inside an iframe. which works well enough, just that when someone clicks on one of the posted items, i would like to see if theres a way to have the link open in a new window— outside of the IFRAME. my width is set to 900px… to be safe,… and most websites will push it to 1000 or so and get cut off.

    so, a way of using _blank to jump outside the IFRAME… i realize this is a bit off topic!

    as for my second question… is there a way to have the facebook wall show up on the WP blog? or even better, what would be ideal is to have my facebook posts sent to WP as a new entry. the idea being that anything i write as a post on facebook gets sent to WP as a post as well.

    i hope that explains it!

    and — thank you for your time and for building the plugin. i havent found another one like it out there…

    The Unhygenius


  35. The Unhygenius
    06/06/2009, 0:53

    I guess the short way of asking you is: what other feeds are there that can be taken from facebook?

    would you plugin work for those if they exist?

    U

  36. @The Unhygenius: The main reason I did this plugin is because I wanted the links to bypass Facebook, because if I didn’t, then everyone will have to have me as a Friend on Facebook only to see the link page on Facebook where they’ll have to click to see the exterior page. So, I thought the Facebook step was unnecessary.

    A feed has three main fields: *Title*, *Content* and *Link*. Any simple plugin will let you take any of the feeds on Facebook and show the *Title*, linking to the page on *Link*.
    Not this one though, because it does something a little bit more complicated, it parses the *Content* to find the proper link (the one outside of Facebook).

    With a simple feed plugin you can import a bunch of things, like notes and statuses.

    And for getting those things into posts… I’m working on it with Links. I don’t know if some plugin exists for doing it with Notes.

    I hope some of all this was helpful in some way.

  37. Hello there,
    I’m trying your plugin, but I’m not finding the option «Posted Items» on the right sidebar of facebook!
    I’ve found only «posted links» on the bottom left and was able to put it to work, but that only shares links and ignores posts that don’t have an hyperlink.
    Also, it doesn’t work on my sidebar, but works on the footer. Can that have anything to do with the theme I’m using?
    Can you help please?!
    Regards,
    Andreia
    note: thanks for creating this plugin.

  38. @Andreia: Yup, Facebook changed the name from «Posted Items» to «Links», so you’re looking for «Posted Links».

    What do you mean by «posts that don’t have a hyperlink»? This plugin is for the links only, it bypasses Facebook to properly link them.

    And maybe the thing with the sidebar may have to do with widgets, do you use them?

    Sorry for the late answer, if you have any other doubt, feel free to post it, I’ll try to answer it as soon as possible.

  39. Hi there

    Thanks for the plugin seems to be working great. I know this was touched on earlier, the links are displaying as linking to my site and I would like to modify them to link to facebook (opening in a new window).

    I have used the plugin for my friends statuses.

    Cheers
    Rob

  40. Hi Fepe

    Thanks for the link, it’s something I’d seen before but couldn’t find again! I’ve integrated it into your plugin now 😉

    All I need to do is have so that each post links to the actual status on Facebook – it’s a nice to have but not essential!

    You can see your plugin at http://www.RobHeywood.net

    Thanks for your help
    Rob

  41. I just have to ask something.. the plugin was easy to install and it looks fine.. but it doesn’t show my latest note on Facebook.. I updated my facebook with a new status note for about 10 minutes ago, but in my wordpress it is the note before that is still there.

    How long does it take before the blog shows the new note?
    Best regards
    Ulrica

  42. OK.. when I installed the plugin it did show my latest 5 status updates so I thought it was what the plugin did 😕 … and I that was so happy about the plugin…

    The one you are linking to ( facebook-status-for-wordpress ) doesn’t work. Many people have tried it but they cannot get it to work so something is wrong with that plugin.. but I’ll keep looking for other plugins that can show my latest status update.

    Thank you anyway :)

  43. Hello!

    Thank you for the plugin: I searched a plugin like this for a long time! 😉

    I’m not an expert of PHP, but I wrote you to propose a little modification on the plugin code, because probably the feed code of Facebook changed a little time ago…

    In row 40 of the plugin php file, instead of ... span class="story_comment_back_quote" ..., I put ... span class="story_comment" ..., according with the feed code of FB. In this way the script captures our text comment of the FB post correctly, and we can put it after the link in WordPress putting echo $before_item;?><a rel="nofollow" href="" title=""> in row 48. Take a look on my Blog to view the result (the plugin acts in the sidebar).

    I hope this suggest will be useful for many people! 😀

    (And sorry for the poor english)

    • Ginex101, you are absolutely right, thanks!. What now is «story_comment» once was «story_comment_back_quote», so your correction is great.

      As you could have seen from the code, I used that text for the title instead of showing it below the link, but since Facebook changed it the title shows… well, nothing :p

      The place where you display it is up to the user, and your way is great, so congrats on modifying the code.

      I love it when someone changes something I did to fit their desires, I think that’s the spirit of free code =)

  44. Hi,
    Thanks for the great plugin!

    Still i’ve an question for you…
    Is it posible to use the links (from the posted items/links) and make from that an (youtube/vimeo/other page) video player, instead of the link.

    It makes it a more interesting. 😀

    Martijn.

    • Martijn, if you know PHP you can use this plugin with any other plugin that displays videos.
      If that’s the only thing you post on Facebook, then the PHP variable $item_url[1] (it’s inside of a loop of course) will print you the video URL that you can use.

      It’s not hard.

      If you have in doubt, don’t hesitate to ask, I’ll gladly help you :smile: (Or at least try 😛 )

      • Hi,
        thanks for the reaction!

        I’m not shure if I’m doint it right…?
        I use Viper’s Video Quicktags plugin to show me video’s. (and Inline PHP to use php in pages).

        this is the code I use but does’nt show me the video’s right…

        [youtube][exec]
        if (function_exists(«fb_posted_items»)) : ?>

        <?php endif;
        [/exec][/youtube]

  45. @Martijn: It’s a bit more complicated. First of all, you are checking if the function exists, and not printing it. But, still, my plugin already prints the whole list, you should modify it to get only the URL.

    I’ll send a modification that I think you could use, to your mail. Then tell me what you think.

  46. i’m using ur plugin thx a lot fepe!

  47. Hi again! 😀
    I love your plugin, and try to adjust it to my wishes.
    This time my question is:
    Is it posible to have the elements you get from facebook separately. (not only the url) For example the: -Title -Description -Picture

    Martijn

  48. When the programme was first broadcast there was a rule that no questions could be asked on topics that had been discussed in the Houses of Parliament during the last two weeks. ,

  49. I was so excited that I’d finally found the solution to displaying my FB post on my blog and then I got this error message:

    Warning: array_slice(): The first argument should be an array in /home/content/m/e/r/mercerblack/html/wp-content/plugins/facebook-posted-items/fp_fb_posted_items.php on line 31

    It’s up on my site right now. What am I doing wrong?

  50. Hola, tal vez es muy basica mi pregunta :roll: pero me gustaria saber de donde saco el ID y el Key de mi Facebook para para poder enlazar esta aplicacion a mi facebook.

    Gracias de antemano.

    • ¿Para qué necesitás el ID y el Key? Sólo necesitás la URL, donde está incluido el ID y el Key.

      Y la URL la sacás de Facebook, está todo explicado en el archivo readme-es.txt 😉

      Cualquier duda preguntame y lo vemos.