WordPress.org

Ready to get started?Download WordPress

Forums

WP Facebook Open Graph protocol
[resolved] call_user_func_array error on latest update (20 posts)

  1. Corinne
    Member
    Posted 2 years ago #

    Hi, I just installed the latest update and am now getting the following error at the bottom of every page on the frontend:

    Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'wpfbogp_end_ob' was given in /_PATH_/wp-includes/plugin.php on line 405

    Any idea on how to fix this? Thanks!

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

  2. Andrew Ryno
    Member
    Plugin Author

    Posted 2 years ago #

    Hi Corinne,

    That was a bug on my end, sorry about that. I'll probably be pushing another version tonight to fix it, but it's minor other than the PHP warning that it outputs (plugin still works). For your production site, this shouldn't be outputted though. I'd recommend looking into your wp-config.php file and setting 'WP_DEBUG' to false (again, assuming this site is in production).

    If you want to fix it in the meantime, and are comfortable with PHP, you can change line 90 in wp-facebook-ogp.php to use 'wpfbogp_flush_ob' instead of 'wpfbogp_end_ob'. Otherwise you can just wait for the update.

    Thanks,
    Andrew

  3. Corinne
    Member
    Posted 2 years ago #

    That's odd. Debug is already set to false in my config file. No worries though, I'll just wait for the update! Thanks for the quick reply.

  4. eliserochelle
    Member
    Posted 2 years ago #

    Hi,

    I'm having the same issue after upgrading (disabling the plugin removes the error).

    I'm not keen on digging into the config file so I'll just wait for the fix also.

    Thanks guys

    Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'wpfbogp_end_ob' not found or invalid function name in /home/bostonte/public_html/wp-includes/plugin.php on line 405

  5. Hellpwn
    Member
    Posted 2 years ago #

    If you want to fix it in the meantime, and are comfortable with PHP, you can change line 90 in wp-facebook-ogp.php to use 'wpfbogp_flush_ob' instead of 'wpfbogp_end_ob'. Otherwise you can just wait for the update.

    Found Line 90 :
    add_action( 'wp_footer', 'wpfbogp_end_ob', 10000 ); // Fire after other plugins (which default to priority 10)

    Change for :
    add_action( 'wp_footer', 'wpfbogp_flush_ob', 10000 ); // Fire after other plugins (which default to priority 10)

    Working for me.
    Thank you Andrew.

  6. DanielNest
    Member
    Posted 2 years ago #

    Have the same exact issue, happy to hear an update's on the way. Will stay tuned :)

  7. Alessandro Timmi
    Member
    Posted 2 years ago #

    If you want to fix it in the meantime, and are comfortable with PHP, you can change line 90 in wp-facebook-ogp.php to use 'wpfbogp_flush_ob' instead of 'wpfbogp_end_ob'.

    Thanks, it works!

  8. Andrew Ryno
    Member
    Plugin Author

    Posted 2 years ago #

    Just pushed 2.0.2 that fixes this bug.

  9. Alessandro Timmi
    Member
    Posted 2 years ago #

    Awesome!

  10. eliserochelle
    Member
    Posted 2 years ago #

    perfect! thanks

  11. adityaaguptaa
    Member
    Posted 2 years ago #

    Hey Andrew,

    I just updated teh plugin.

    I'm not so sure why, these days most of the links I add from my wordpress blog onto my facebook page, they don't show up the picture/description of the post. Is it something to do with the plugin bug which was there in the last version?

    Check this - http://imgur.com/Cketc
    http://imgur.com/GD9rP
    http://imgur.com/mDRw3

    In the backend of the plugin, I' have entered by Facebook page id and left the app id field blank.

    Will be great if you can let me know a solution for this? The number of hits through Facebook make a huge difference for us. And the ones without the description don't get any hits.

    Cheers.

  12. Andrew Ryno
    Member
    Plugin Author

    Posted 2 years ago #

    Looking at the meta data that the plugin is outputting, the problem is that you inputted the actual facebook page URL into the box, not the id. Unfortunately FB removed support for using page ID's, so you will either have to setup an application (though https://developers.facebook.com) or use your personal account ID (found via http://graph.facebook.com/usernamehere).

  13. adityaaguptaa
    Member
    Posted 2 years ago #

    I deleted the application yesterday because it serve any purpose.

    "id": "11642269513xxxx",
    "name": "Social xxxxxx",
    "cover_id": 18907198120xxxx,

    I should be using the first one right?

  14. Andrew Ryno
    Member
    Plugin Author

    Posted 2 years ago #

    You used to be able to, but Facebook removed support for using page ids (because they removed Insights for pages, I think) so your only options are using your personal account ID or application ID.

  15. adityaaguptaa
    Member
    Posted 2 years ago #

    Thats strange. Using a personal profile id wouldn't do any harm ?

  16. Andrew Ryno
    Member
    Plugin Author

    Posted 2 years ago #

    Nope. You'd just see all the like/share/etc. analytics under that account rather under the page.

  17. adityaaguptaa
    Member
    Posted 2 years ago #

    Umm.. Weird. I never saw any site data related to like/share on the facebook page or the app or anywhere else on teh site/ facebook. Facebook page only shows the relevant updates for the likes / posts etc on the timeline and thats about it.

  18. Chuck Reynolds
    Member
    Plugin Author

    Posted 2 years ago #

    Right now you have the Full facebook url of your profile in the fb:admins field... ONLY put your Id number, which is 100001467475091

  19. Chuck Reynolds
    Member
    Plugin Author

    Posted 2 years ago #

  20. adityaaguptaa
    Member
    Posted 2 years ago #

    Oh. I already changed the Facebook user id account field to that.. 100001467475091

    Do I need to do anything else? Have left the app field blank..

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic