WordPress.org

Plugin Directory

Changeset 593861


Ignore:
Timestamp:
09/03/12 06:43:28 (20 months ago)
Author:
SteveAtty
Message:

Version 2.1.18 - Curl IPv6 fixes

Location:
wordbooker
Files:
3 edited
17 copied

Legend:

Unmodified
Added
Removed
  • wordbooker/tags/2.1.18/includes/wordbooker_facebook_curl.php

    r593722 r593861  
    6868} 
    6969 
    70 function wordbooker_friends($access_token,$flid) { 
    71         $url = 'https://graph.facebook.com/'.$flid.'/members?access_token='.$access_token.'&format=JSON'; 
    72         if ($flid==-100) { 
    73           $url = 'https://graph.facebook.com/me/friends?access_token='.$access_token.'&format=JSON';} 
    74     $x=wordbooker_make_curl_call($url); 
    75         return($x); 
    76 } 
    7770function wordbooker_delete_fb_post($fb_post_id,$access_token){ 
    7871    $url='https://graph.facebook.com/'.$fb_post_id.'?method=delete&access_token='.$access_token; 
     
    8275 
    8376function wordbooker_get_access_token($access_token) { 
     77    #$url='https://graph.facebook.com/oauth/access_token?client_id='.WORDBOOKER_FB_ID.'&client_secret='.WORDBOOKER_FB_SECRET.'&grant_type=fb_exchange_token&fb_exchange_token='.$access_token; 
    8478    $url='https://wordbooker.tty.org.uk/refresh.php?oldie='.$access_token; 
    8579    $x=wordbooker_make_curl_call2($url); 
     
    9286        $url = 'https://graph.facebook.com/'.$fb_id.'/feed/?access_token='.$access_token.'&format=JSON&limit=10'; 
    9387    $x=wordbooker_make_curl_call($url); 
     88    #var_dump($x); 
    9489        return($x); 
    9590} 
    9691function wordbooker_fb_pemissions($fb_id,$access_token) { 
    9792    if (!isset($fb_id)){$fb_id='me';} 
    98         $url = 'https://graph.facebook.com/'.$fb_id.'/permissions?access_token=22'.$access_token.'&format=JSON'; 
     93        $url = 'https://graph.facebook.com/'.$fb_id.'/permissions?access_token='.$access_token.'&format=JSON'; 
    9994    $x=wordbooker_make_curl_call($url); 
    10095        return($x); 
    10196} 
    10297function wordbooker_fb_get_comments($fb_id,$access_token) { 
    103     $url = 'https://graph.facebook.com/'.$fb_id.'/comments?access_token=22'.$access_token; 
     98    $url = 'https://graph.facebook.com/'.$fb_id.'/comments?access_token='.$access_token; 
    10499    $x=wordbooker_make_curl_call($url); 
    105100        return($x); 
     
    126121 
    127122function wordbooker_make_curl_call($url) { 
    128     global $wordbooker_settings;     
    129123    $ch = curl_init(); 
     124    global $wordbooker_settings;     
    130125        curl_setopt($ch, CURLOPT_URL, $url); 
    131126        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 
     
    143138        curl_close($ch); 
    144139    $x=json_decode( $response); 
    145     //var_dump($x); 
    146     if (isset($x->error_msg)) {  
    147     $error=$x->error_msg;} 
    148     if (isset($x->error->message)) {  
    149     $error=$x->error->message;} 
    150     if (isset($error)) {  
    151         throw new Exception ($error); 
     140    if (isset($x->message)) {  
     141        throw new Exception ($x->message); 
    152142    } 
    153143     return( $x); 
     
    155145 
    156146function wordbooker_make_curl_call2($url) { 
    157     global $wordbooker_settings; 
    158147    $ch = curl_init(); 
     148    global $wordbooker_settings;     
    159149        curl_setopt($ch, CURLOPT_URL, $url); 
    160150        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 
     
    171161    $err_text=curl_error($ch); 
    172162        curl_close($ch); 
    173     //wordbooker_debugger("Curl Call returns ",print_r($response,true),-5,98) ; 
     163    wordbooker_debugger("Curl Call returns ",print_r($response,true),-5,98) ; 
    174164    $x=json_decode($response); 
    175165    if (is_null($x)) {$x=$response;} 
     
    181171 
    182172function wordbooker_make_curl_post_call($url,$data) { 
    183     global $wordbooker_settings; 
    184173    $ch = curl_init(); 
     174    global $wordbooker_settings;     
    185175        curl_setopt($ch, CURLOPT_URL, $url); 
    186176        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 
     
    189179    curl_setopt($ch, CURLOPT_TIMEOUT, 60); 
    190180    curl_setopt($ch, CURLOPT_CAINFO, dirname(__FILE__) . '/fb_ca_chain_bundle.crt'); 
    191     if (WORDBOOKER_IPV==6 && isset($wordbooker_settings['wordbooker_use_curl_4'])) { 
    192     curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 ); 
    193     } 
    194     curl_setopt($ch, CURLOPT_POSTFIELDS, $data); 
     181    if (WORDBOOKER_IPV==6 && isset($wordbooker_settings['wordbooker_use_curl_4'])) { 
     182    curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 ); 
     183    } 
     184     curl_setopt($ch, CURLOPT_POSTFIELDS, $data); 
    195185        $response = curl_exec($ch); 
    196186    $err_no=curl_errno($ch); 
  • wordbooker/tags/2.1.18/readme.txt

    r593722 r593861  
    66Requires at least: 2.9 
    77Tested up to: 3.4.1 
    8 Stable tag: 2.1.17 
     8Stable tag: 2.1.18 
    99 
    1010This plugin allows you to cross-post your blog posts to your Facebook Wall and to any Facebook Fan Page / Group that you are an administrator for.  
     
    115115 
    116116== Changelog == 
     117 
     118= Version 2.1.18  03/09/2012 = 
     119- Rollback some changes in the curl include file which were from 2.2  
    117120 
    118121= Version 2.1.17  02/09/2012 = 
  • wordbooker/tags/2.1.18/wordbooker.php

    r593722 r593861  
    66Author: Steve Atty  
    77Author URI: http://wordbooker.tty.org.uk 
    8 Version: 2.1.17 
     8Version: 2.1.18 
    99*/ 
    1010 
     
    3939define('WORDBOOKER_DEBUG', false); 
    4040define('WORDBOOKER_TESTING', false); 
    41 define('WORDBOOKER_CODE_RELEASE',"2.1.17 R00 - Machine Beside Machine"); 
     41define('WORDBOOKER_CODE_RELEASE',"2.1.18 R00 - A Lack of Understanding"); 
    4242 
    4343# For Troubleshooting  
  • wordbooker/trunk/includes/wordbooker_facebook_curl.php

    r593722 r593861  
    6868} 
    6969 
    70 function wordbooker_friends($access_token,$flid) { 
    71         $url = 'https://graph.facebook.com/'.$flid.'/members?access_token='.$access_token.'&format=JSON'; 
    72         if ($flid==-100) { 
    73           $url = 'https://graph.facebook.com/me/friends?access_token='.$access_token.'&format=JSON';} 
    74     $x=wordbooker_make_curl_call($url); 
    75         return($x); 
    76 } 
    7770function wordbooker_delete_fb_post($fb_post_id,$access_token){ 
    7871    $url='https://graph.facebook.com/'.$fb_post_id.'?method=delete&access_token='.$access_token; 
     
    8275 
    8376function wordbooker_get_access_token($access_token) { 
     77    #$url='https://graph.facebook.com/oauth/access_token?client_id='.WORDBOOKER_FB_ID.'&client_secret='.WORDBOOKER_FB_SECRET.'&grant_type=fb_exchange_token&fb_exchange_token='.$access_token; 
    8478    $url='https://wordbooker.tty.org.uk/refresh.php?oldie='.$access_token; 
    8579    $x=wordbooker_make_curl_call2($url); 
     
    9286        $url = 'https://graph.facebook.com/'.$fb_id.'/feed/?access_token='.$access_token.'&format=JSON&limit=10'; 
    9387    $x=wordbooker_make_curl_call($url); 
     88    #var_dump($x); 
    9489        return($x); 
    9590} 
    9691function wordbooker_fb_pemissions($fb_id,$access_token) { 
    9792    if (!isset($fb_id)){$fb_id='me';} 
    98         $url = 'https://graph.facebook.com/'.$fb_id.'/permissions?access_token=22'.$access_token.'&format=JSON'; 
     93        $url = 'https://graph.facebook.com/'.$fb_id.'/permissions?access_token='.$access_token.'&format=JSON'; 
    9994    $x=wordbooker_make_curl_call($url); 
    10095        return($x); 
    10196} 
    10297function wordbooker_fb_get_comments($fb_id,$access_token) { 
    103     $url = 'https://graph.facebook.com/'.$fb_id.'/comments?access_token=22'.$access_token; 
     98    $url = 'https://graph.facebook.com/'.$fb_id.'/comments?access_token='.$access_token; 
    10499    $x=wordbooker_make_curl_call($url); 
    105100        return($x); 
     
    126121 
    127122function wordbooker_make_curl_call($url) { 
    128     global $wordbooker_settings;     
    129123    $ch = curl_init(); 
     124    global $wordbooker_settings;     
    130125        curl_setopt($ch, CURLOPT_URL, $url); 
    131126        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 
     
    143138        curl_close($ch); 
    144139    $x=json_decode( $response); 
    145     //var_dump($x); 
    146     if (isset($x->error_msg)) {  
    147     $error=$x->error_msg;} 
    148     if (isset($x->error->message)) {  
    149     $error=$x->error->message;} 
    150     if (isset($error)) {  
    151         throw new Exception ($error); 
     140    if (isset($x->message)) {  
     141        throw new Exception ($x->message); 
    152142    } 
    153143     return( $x); 
     
    155145 
    156146function wordbooker_make_curl_call2($url) { 
    157     global $wordbooker_settings; 
    158147    $ch = curl_init(); 
     148    global $wordbooker_settings;     
    159149        curl_setopt($ch, CURLOPT_URL, $url); 
    160150        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 
     
    171161    $err_text=curl_error($ch); 
    172162        curl_close($ch); 
    173     //wordbooker_debugger("Curl Call returns ",print_r($response,true),-5,98) ; 
     163    wordbooker_debugger("Curl Call returns ",print_r($response,true),-5,98) ; 
    174164    $x=json_decode($response); 
    175165    if (is_null($x)) {$x=$response;} 
     
    181171 
    182172function wordbooker_make_curl_post_call($url,$data) { 
    183     global $wordbooker_settings; 
    184173    $ch = curl_init(); 
     174    global $wordbooker_settings;     
    185175        curl_setopt($ch, CURLOPT_URL, $url); 
    186176        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 
     
    189179    curl_setopt($ch, CURLOPT_TIMEOUT, 60); 
    190180    curl_setopt($ch, CURLOPT_CAINFO, dirname(__FILE__) . '/fb_ca_chain_bundle.crt'); 
    191     if (WORDBOOKER_IPV==6 && isset($wordbooker_settings['wordbooker_use_curl_4'])) { 
    192     curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 ); 
    193     } 
    194     curl_setopt($ch, CURLOPT_POSTFIELDS, $data); 
     181    if (WORDBOOKER_IPV==6 && isset($wordbooker_settings['wordbooker_use_curl_4'])) { 
     182    curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 ); 
     183    } 
     184     curl_setopt($ch, CURLOPT_POSTFIELDS, $data); 
    195185        $response = curl_exec($ch); 
    196186    $err_no=curl_errno($ch); 
  • wordbooker/trunk/readme.txt

    r593722 r593861  
    66Requires at least: 2.9 
    77Tested up to: 3.4.1 
    8 Stable tag: 2.1.17 
     8Stable tag: 2.1.18 
    99 
    1010This plugin allows you to cross-post your blog posts to your Facebook Wall and to any Facebook Fan Page / Group that you are an administrator for.  
     
    115115 
    116116== Changelog == 
     117 
     118= Version 2.1.18  03/09/2012 = 
     119- Rollback some changes in the curl include file which were from 2.2  
    117120 
    118121= Version 2.1.17  02/09/2012 = 
  • wordbooker/trunk/wordbooker.php

    r593722 r593861  
    66Author: Steve Atty  
    77Author URI: http://wordbooker.tty.org.uk 
    8 Version: 2.1.17 
     8Version: 2.1.18 
    99*/ 
    1010 
     
    3939define('WORDBOOKER_DEBUG', false); 
    4040define('WORDBOOKER_TESTING', false); 
    41 define('WORDBOOKER_CODE_RELEASE',"2.1.17 R00 - Machine Beside Machine"); 
     41define('WORDBOOKER_CODE_RELEASE',"2.1.18 R00 - A Lack of Understanding"); 
    4242 
    4343# For Troubleshooting  
Note: See TracChangeset for help on using the changeset viewer.