Forum Replies Created

Viewing 5 replies - 76 through 80 (of 80 total)
  • Thread Starter awwnuts

    (@awwnuts)

    ??

    Thread Starter awwnuts

    (@awwnuts)

    its 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.

    Thread Starter awwnuts

    (@awwnuts)

    Here 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.

    Thread Starter awwnuts

    (@awwnuts)

    I downloaded it from the Facebook Website.

    https://developers.facebook.com/wordpress/

    Thread Starter awwnuts

    (@awwnuts)

    What do you mean by unknown? It is made by Facebook?

Viewing 5 replies - 76 through 80 (of 80 total)