ownduck / libweibo

Automatically exported from code.google.com/p/libweibo
0 stars 0 forks source link

修订 upload 方法,使其支持 annotation #18

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
1049   function upload( $status, $pic_path, $lat = NULL, $long = NULL, 
$annotations = NULL)
1050   {                                                              
1051     $params = array();                                           
1052     $params['status'] = $status;                                 
1053     $params['pic'] = '@'.$pic_path;                              
1054     if ($lat) {                                                  
1055       $params['lat'] = floatval($lat);                           
1056     }                                                            
1057     if ($long) {                                                 
1058       $params['long'] = floatval($long);                         
1059     }                                                            
1060     if (is_string($annotations)) {                               
1061       $params['annotations'] = $annotations;                     
1062     } elseif (is_array($annotations)) {                          
1063       $params['annotations'] = '['.json_encode($annotations).']';
1064     }                                                            
1065                                                                  
1066     return $this->oauth->post( 'statuses/upload', $params, true );
1067   }          

Original issue reported on code.google.com by yangzhuoluo on 6 Mar 2012 at 5:28

GoogleCodeExporter commented 9 years ago
这里一直都没人来修改啊。。。还是这里不维护了。???

Original comment by starsw...@gmail.com on 1 Apr 2012 at 10:14

GoogleCodeExporter commented 9 years ago
嗯,好像一直没有人来维护

Original comment by yangzhuoluo on 3 Apr 2012 at 1:57