我的facebook帖子应该自动发布在wordpress作为文章

i need your help. Actually i create a new page with wordpress and have a little problem. This new page is for a restaurant/bar.

We often post in Facebook our daily menu or specials. These post should be automatically insert into wordpress as articles. I found some plugins, they work, but the output are one long list of the post and not as articles.

First Plugin

Second Plugin

Anybody here, to knows a solution?

There is a great tutorial on how to interact with the Graph API here: http://johndoesdesign.com/blog/2011/php/adding-a-facebook-news-status-feed-to-a-website/

My personal approach is to wrap that code in a function and then echo that function in a theme´s template-file.

Recipe:
1. get an access token for the page
2. create a function in your theme´s functions.php:

    function display_facebook_info() {
      $page_id = 'YOUR_PAGE_ID';
      $access_token = 'YOUR_ACCESS_TOKEN';
      //Get the JSON
      $json_object = @file_get_contents('https://graph.facebook.com/' . $page_id . 
      '/posts?access_token=' . $access_token);
      //Interpret data
      $fbdata = json_decode($json_object);

      foreach ($fbdata->data as $post )
        {
          $posts .= '<p><a href="' . $post->link . '">' . $post->story . '</a></p>';
          $posts .= '<p><a href="' . $post->link . '">' . $post->message . '</a></p>';
          $posts .= '<p>' . $post->description . '</p>';
          $posts .= '<br />';
      }
      //Display the posts
      echo $posts;
    }

3. Display the posts in your template-file:

<?php echo display_facebook_info(); ?>