WordPress.org

Ready to get started?Download WordPress

Forums

WP Facebook Open Graph protocol
[resolved] sharing on Content-blog.php (7 posts)

  1. pmonty
    Member
    Posted 1 year ago #

    I am using the facebook feed dialog code on my content-blog.php as you can see on my site. Dontstopdreaming.net

    i installed your plugin set my userid and appid etc...

    but it doesn't seem to be working.

    <div id='fb-root'></div>
        <script src='http://connect.facebook.net/en_US/all.js'></script>
        <p><a onclick='postToFeed(); return false;'>Post to Feed</a></p>
        <p id='msg'></p>
    
        <script>
          FB.init({appId: "173750729467843", status: true, cookie: true});
    
          function postToFeed() {
    
            // calling the API ...
            var obj = {
              method: 'feed',
              redirect_uri: '<?php the_permalink(); ?>',
              link: '<?php the_permalink(); ?>',
              //picture: 'http://fbrell.com/f8.jpg',
              //name: 'Facebook Dialogs',
              //caption: 'Reference Documentation',
              //description: 'Using Dialogs to interact with people.'
            };
    
            function callback(response) {
              document.getElementById('msg').innerHTML = "Post ID: " + response['post_id'];
            }
    
            FB.ui(obj, callback);
          }
        </script>

    http://wordpress.org/extend/plugins/wp-facebook-open-graph-protocol/

  2. Chuck Reynolds
    Member
    Plugin Author

    Posted 1 year ago #

    I see in your source it's working fine:

    <!-- WordPress Facebook Open Graph protocol plugin (WPFBOGP v2.0.7) http://rynoweb.com/wordpress-plugins/ -->
    <meta property="fb:admins" content="609705884"/>
    <meta property="fb:app_id" content="173750729467843"/>
    <meta property="og:url" content="http://dontstopdreaming.net"/>
    <meta property="og:title" content="Dont Stop Dreaming"/>
    <meta property="og:site_name" content="Dont Stop Dreaming"/>
    <meta property="og:description" content="Dream Big, Start Now"/>
    <meta property="og:type" content="website"/>
    <!-- There is not an image here as you haven't set a default image in the plugin settings! -->
    <meta property="og:locale" content="en_us"/>
    <!-- // end wpfbogp -->

    And debugger shows everything is fine except your missing image selected is a warning. https://developers.facebook.com/tools/debug/og/object?q=dontstopdreaming.net

    I don't see any problems here.

  3. pmonty
    Member
    Posted 1 year ago #

    If i click on 'post to feed' the description is wrong. It is all weird text and it only shares the Benjamin Franklin link for every thing on the main page.

    Edit:

    I have begun testing with my addthis plugin the three icons you can see on the site. They seem to be sharing the right permalink but the description is messed up for some.

    <div class="addthis_toolbox addthis_default_style"
    addthis:url="<?php the_permalink(); ?>">
    <a class="addthis_button_preferred_1" style="cursor:pointer"></a>
    <a class="addthis_button_preferred_2" style="cursor:pointer"></a>
    <a class="addthis_button_preferred_3" style="cursor:pointer"></a>
    </div>

    thats the code and i have my id and so on setup for addthis perfectly. Maybe the open graph app needs to take time to recognize stuff?

  4. Chuck Reynolds
    Member
    Plugin Author

    Posted 1 year ago #

    so it's not pulling any text from that link you're feeding FB then. either body content for that will work or add a meta description via an seo plugin to those indv posts

  5. pmonty
    Member
    Posted 1 year ago #

    Just edited my above post. Also any seo plugins you can recommend?

  6. Chuck Reynolds
    Member
    Plugin Author

    Posted 1 year ago #

    depends on your needs but i tend to use Yoasts seo plugin

  7. pmonty
    Member
    Posted 1 year ago #

    i think what i need might be impossible now. Because it requires meta description for each post. And i am guessing that they can all only use 1 :(

    I used yoast and setup a different description for each but doesn't use any of them anyway

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.