awwnuts
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Facebook App causing Post problems??
Forum: Fixing WordPress
In reply to: Facebook App causing Post problemsits on the developers page swan….lol…how much more do you need before it becomes anything more than an unknown source to you.
And even www.ads-software.com has a link to it…
https://www.ads-software.com/extend/plugins/facebook/
@potent, that condition I added works fine. If anything shows up inside the variable, then it’ll run the code as intended.
Forum: Fixing WordPress
In reply to: Facebook App causing Post problemsHere is the solution I found.
Line 255-285 is
foreach($fb_mentioned_friends as $friend) { try { if ($post_thumbnail_url == null) { $args = array('link' => apply_filters( 'rel_canonical', get_permalink()), 'name' => get_the_title(), 'caption' => apply_filters( 'the_excerpt', get_the_excerpt() ), 'description' => apply_filters( 'the_excerpt', get_the_excerpt() ), 'message' => $mentioned_friends_message, ); } else { $args = array('link' => apply_filters( 'rel_canonical', get_permalink()), 'picture' => $post_thumbnail_url, 'name' => get_the_title(), 'caption' => apply_filters( 'the_excerpt', get_the_excerpt() ), 'description' => apply_filters( 'the_excerpt', get_the_excerpt() ), 'message' => $mentioned_friends_message, ); } $args['ref'] = 'fbwpp'; $publish_result = $facebook->api('/' . $friend['id'] . '/feed', 'POST', $args); $publish_ids_friends[] = sanitize_text_field($publish_result['id']); } catch (FacebookApiException $e) { } }
I surrounded it with this
if(!empty($fb_mentioned_friends)){ }
Line 297-328 is
foreach($fb_mentioned_pages as $page) { try { if ($post_thumbnail_url == null) { $args = array('link' => apply_filters( 'rel_canonical', get_permalink()), 'name' => get_the_title(), 'caption' => apply_filters( 'the_excerpt', get_the_excerpt() ), 'description' => apply_filters( 'the_excerpt', get_the_excerpt() ), 'message' => $mentioned_pages_message, ); } else { $args = array('link' => apply_filters( 'rel_canonical', get_permalink()), 'picture' => $post_thumbnail_url, 'name' => get_the_title(), 'caption' => apply_filters( 'the_excerpt', get_the_excerpt() ), 'description' => apply_filters( 'the_excerpt', get_the_excerpt() ), 'message' => $mentioned_pages_message, ); } $args['ref'] = 'fbwpp'; $publish_result = $facebook->api('/' . $page['id'] . '/feed', 'POST', $args); $publish_ids_pages[] = sanitize_text_field($publish_result['id']); } catch (FacebookApiException $e) { } //$mentions .= $page['id'] . ","; }
I just surrounded that with this
if(!empty($fb_mentioned_pages)){ }
I’m not sure if this is going to help anything, but it got rid of the error and the posting is working fine.
Forum: Fixing WordPress
In reply to: Facebook App causing Post problemsI downloaded it from the Facebook Website.
Forum: Fixing WordPress
In reply to: Facebook App causing Post problemsWhat do you mean by unknown? It is made by Facebook?