WordPress.org

Ready to get started?Download WordPress

Forums

WPBook Lite
Comments are not imported from FB (14 posts)

  1. Joseph
    Member
    Posted 1 year ago #

    I am using WPBook Lite 1.5.3 on wordpress 3.5.1. I have set up everything as requested but the FB comments are not imported into the wordpress blog.

    Why is that?

    http://wordpress.org/extend/plugins/wpbook-lite/

  2. johneckman
    Member
    Plugin Author

    Posted 1 year ago #

    Not sure why it isn't working for you - it is likely either a setup problem or a misunderstanding of what the plugin does.

    Have you - after installing and configuring the plugin - published a new post, and had that post successfully cross-post to your Facebook profile/wall/group?

    Have people commented on that post, and those comments have not been imported to WordPress?

    Is WordPress pseudo cron running on your wordpress install?

    Have you enabled debugging and do you see any entries in your debug log?

  3. pkaione
    Member
    Posted 1 year ago #

    Hi John. I'm using WPbook Lite 1.5.3 and WordPress 3.5.1 . I'm experiencing similarly problem. FB comments are not importing to my wordpress blog. When I looked at the wpbook-lite/wpbook_debug.txt, I see all the comments that people are posted on FB. However, the comments did not get posted into the comment section of the webpage of the wordpress. Moreover, when I type a comment directly in WP, they did not get post either. The moderation of my wordpress are turned off. I have waited for more than 12 hours, but nothing showed up in the wordpress post. Can you suggest what I need to look at next? Thank you.

  4. johneckman
    Member
    Plugin Author

    Posted 1 year ago #

    @pkalone - when you say:

    "when I type a comment directly in WP, they did not get post either"

    Do you mean you can't make any comments in WordPress with WPBook Lite enabled? Or did you mean that comments you make in WP don't get posted to Facebook - which is not something WPBook does.

    When you say "I see all the comments that people are posted on FB" in the debug log, does the debug log say those comments were saved?

    Are you using any anti-spam plugins like bad behavior or other comment-related plugins?

    Do comments work on your blog with WPBook Lite disabled?

  5. pkaione
    Member
    Posted 1 year ago #

    Thank you John for quickly getting back to me. Here are the answers to your questions:

    Do you mean you can't make any comments in WordPress with WPBook Lite enabled?
    - That is right. When WPBook Lite is enabled, I was unable to post comments directly into my wordpress blog.

    Or did you mean that comments you make in WP don't get posted to Facebook - which is not something WPBook does.
    - No, I understand. I don't expect the comments made directly in WP to be posted in FB.

    When you say "I see all the comments that people are posted on FB" in the debug log, does the debug log say those comments were saved?
    - No, I did not see the debug log say those comments were saved.

    Are you using any anti-spam plugins like bad behavior or other comment-related plugins?
    - I used "Disable Comments" plugin by Samir Shah, but I only disabled it on Pages, not for the Posts. I will disable this "Disable Comments" plugin and test WPBook Lite again. I will respond with the result to let you know if this plugin causes the confict. However, I wanted to note that afer I deactivated the WPBook Lite, I was able to comment and posted successfully directly in WP.

    Do comments work on your blog with WPBook Lite disabled?
    - Yes, the comments work on my blog with WPBook Lite being disabled.

    Thank you John, I will reply with the result after I do the test with the Disable comments plugin disabled.

  6. pkaione
    Member
    Posted 1 year ago #

    Hello John. When I disabled the "Disable Comments" plugin and re-enabled the WPBook Lite, this resolved the commenting issues within the WP. I also posted a new blog in WP and it appeared in FB just fine. However, the comments from FB are not posted in WP as I originally stated in the original post above. As I have stated, when I looked at the wpbook-lite/wpbook_debug.txt, the comments from FB are shown there but are not appeared in the comment section of the WP.

    I looked again in the wpbook-lite/wpbook_debug.txt for any statement that says the comments are being saved but found none.

    I also looked thought out the MySQL database but could not find any hints from there either. Does WPBook Lite even utilizes SQL database? I didn't see any table relating to WPBook Lite at all.

    If you have additional questions or need me test or look at something please let me know. I appreciate your helps always. Thank you.

  7. johneckman
    Member
    Plugin Author

    Posted 1 year ago #

    pkalone - can you post the relevent section of wpbook_debug.txt where you see the comments? Be careful to strip out the beginning part which lists your API key and app secret.

    Every time the cron job for WPBook runs, it:

    • Checks to see if it has a valid access token
    • Checks to see if "import comments" was FALSE (setting)
    • Gets posts in last X days (also a setting)
    • Looks to see how many of those posts have a corresponding FB post, by looking for a meta key in the postmeta table - the FB ID of a wall post is stored there
    • For each of the found posts with the right meta key, it checks FB for comments posted after the last timestamped comment imported
    • gets a list of relevant comments from facebook (called FBCommentsList in the debug file)
    • Takes each comment found, gets info about the author of the comment
    • parses the comment array into an array ready for insertion into WP comment db
    • runs the comment through 'preprocess_comment' and wp_filter_comment, then calls wp_insert_comment (these are WordPress APIs)
    • At the end of doing a comment, the debug file should say "posted comment with timestamp" with a timestamp.

    All of this logic happens in the import_comments function and should output fairly verbosely to the debug log - every time the cron runs, which is hourly.

    Can you post some excerpts so I can see if anything jumps out?

  8. johneckman
    Member
    Plugin Author

    Posted 1 year ago #

    Oops. Somehow double posted a comment.

  9. pkaione
    Member
    Posted 1 year ago #

    John, here is the first hour of the debug message from: wpbook-lite/wpbook_debug.txt.

    2013-06-20 18:26:21 : Cron Running
    2013-06-20 18:26:21 : Access token is CKKABzGwJb2PwNHIbcSSRGfJpW5qX60ZCrZCEZBliBUZAs3nvvslvZCOpyZBrbtjYvdqcXYQZAJOUlKlDoMiQSsbR69EZCYp3ZAooeChTLFrIcFVJ47GRZCIOj6IUGI0ZANtTFJFDyZCy479Xdy1XMfn1gPIXxUSZBZCEdTIms4ND
    2013-06-20 18:26:22 : Getting posts, SQL was Select ID FROM wp_posts WHERE post_date BETWEEN '2013-06-13 18:26:22' AND '2013-06-20 18:26:22'
    2013-06-20 18:26:22 : How many posts to consider? 63
    2013-06-20 18:26:22 : How many meta_posts found? 2
    2013-06-20 18:26:22 : Examining a meta_post, post ID is 944, meta key = _wpbook_user_stream_id
    2013-06-20 18:26:22 : FBcomments, fbsql is SELECT time,text,fromid,xid,post_id FROM comment WHERE post_id='20005801852000_141368682733987' AND time > '0' ORDER BY time ASC
    2013-06-20 18:26:22 : FBcommentslist is Array
    (
    [0] => Array
    (
    [time] => 1371748897
    [text] => Test - Comment 1 from FB.
    [fromid] => 120005801852000
    [xid] =>
    [post_id] => 120005801852000_141368682733987
    )

    [1] => Array
    (
    [time] => 1371748917
    [text] => Test - Comment 2 from FB.
    [fromid] => 120005801852000
    [xid] =>
    [post_id] => 120005801852000_141368682733987
    )

    )

    2013-06-20 18:26:22 : Number of comments for this post- 2
    12013-06-20 18:26:22 : Inside comment, comment[time] is 1371748897, comment[fromid] is 120005801852000
    2013-06-20 18:26:22 : Getting author info, fbsql is SELECT name,url FROM profile WHERE id = '120005801852000'
    2013-06-20 18:26:22 : fbuserinfo is an array, count is 1
    2013-06-20 18:26:22 : In fb_user, name is Khmers Connect, url is http://www.facebook.com/pkai.mer
    2013-06-20 18:26:22 : comment[time] was 1371748897, gmt offset is -4, local_time is 1371734497

    Below is the copy of the excerpt of the post in quotations:

    "FB Integration Test

    I am retelling this story. The wordings may not be of the original riddle but it still conveys the same meaning as the original story.

    “ Once upon a time there were three young princes returning home together from their studies. The first prince specialized in the art of archery. He was the legendary fastest and sharpest shooter in the world. The second prince specialized in the aquatic diving and swimming. He was able to swim and dive faster than anyone could. The third prince specialized in the art of wizardry. He was the greatest magician who ever lived. He could magically summon the dead back to life. They had been trained well by their master and had mastered their skills to the highest degree."

    Thank you John.

  10. johneckman
    Member
    Plugin Author

    Posted 1 year ago #

    Is there anything just beyond the part you provided? The next debug line would be something like: "About to call wp_filter_comment on comment id" (where id is the commentID).

    Do you have access to the PHP error log on the machine, or have you run WordPress in debug mode? Seems like an error is not being caught here

  11. pkaione
    Member
    Posted 1 year ago #

    John, no there is nothing else in the log beyond what I posted earlier today. When I went back and looked at the debug log, they are just the repeats of what I posted with different time stamp.

    About the PHP error, my hosting company does setup to collect the errors automatically. I have just setup one up. I will post back with what I find or not find later this evening.

    Thank you.

  12. pkaione
    Member
    Posted 1 year ago #

    The error log files were created, but there was no content generated. I'm not sure what is happening, but thank you so much for trying to help.

  13. imstylin1
    Member
    Posted 1 year ago #

    pkaione,
    I have the same exact problem you are experiencing. I went in and deactivated all my plugins except wpbook and all of the comments posted on FB showed in my dashboard. They all came through. I will now go back and activate each plugin until I find out which one is causing wpbook not to publish received comments from facebook.

  14. johneckman
    Member
    Plugin Author

    Posted 11 months ago #

    THanks imstylin - would be really helpful to know which plugins are interfering

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.