duanjiancong4860 2018-08-24 16:58
浏览 249

Linkedin Share Api获取用户Feed无效

I am working on linkedin api and want to get user feeds from their profile.

I found share api for this but it is working for new post creation but it is not giving feeds.

I am using this rest api https://api.linkedin.com/v2/shares?q=owners&owners={URN}&sharesPerOwner=100

It is not returning user feeds

This Error Coming

Fatal error: Uncaught RuntimeException: Request Error: Not enough permissions to access: GET-owners /shares. Raw Response: Array ( [serviceErrorCode] => 100 [message] => Not enough permissions to access: GET-owners /shares [status] => 403 ) in /storage/ssd5/236/3070236/public_html/linkedin/sdk/LinkedIn.php:271 Stack trace: #0 /storage/ssd5/236/3070236/public_html/linkedin/sdk/LinkedIn.php(212): LinkedIn->_makeRequest('https://api.lin...', Array, 'GET', Array, Array) #1 /storage/ssd5/236/3070236/public_html/linkedin/sdk/LinkedIn.php(181): LinkedIn->fetch('https://api.lin...', Array) #2 /storage/ssd5/236/3070236/public_html/linkedin/feed.php(23): LinkedIn->get('/shares?', Array) #3 {main} thrown in /storage/ssd5/236/3070236/public_html/linkedin/sdk/LinkedIn.php on line 271

   ini_set('display_errors', 1);
   ini_set('display_startup_errors', 1);
   error_reporting(E_ALL);
   session_start();
   include('sdk/LinkedIn.php');
   $li = new LinkedIn(
  array(
    'api_key' => '78n8rt9drtjjjjxfke', 
    'api_secret' => 'WrCvccbvcbvcbcvb7oT', 
    'callback_url' => 'http://example.com/linkedin/demo.php'
  )
);
$url = $li->getLoginUrl(
  array(
    LinkedIn::SCOPE_BASIC_PROFILE, 
    LinkedIn::SCOPE_EMAIL_ADDRESS, 
    LinkedIn::SCOPE_WRITE_SHARE,
  )
);
   $token = $li->setAccessToken($_SESSION['access_token']);
   $profile = $li- 
 >get('/shares?',array('q'=>'owners','owners'=>'urn:li:person:jG_fgrgrrgri','sharesPerOwner'=>100));
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 Qt下使用tcp获取数据的详细操作
    • ¥15 idea右下角设置编码是灰色的
    • ¥15 全志H618ROM新增分区
    • ¥15 在grasshopper里DrawViewportWires更改预览后,禁用电池仍然显示
    • ¥15 NAO机器人的录音程序保存问题
    • ¥15 C#读写EXCEL文件,不同编译
    • ¥15 MapReduce结果输出到HBase,一直连接不上MySQL
    • ¥15 扩散模型sd.webui使用时报错“Nonetype”
    • ¥15 stm32流水灯+呼吸灯+外部中断按键
    • ¥15 将二维数组,按照假设的规定,如0/1/0 == "4",把对应列位置写成一个字符并打印输出该字符