I am using API V1 API, I am able to post on feeds but unable to fetch my feeds.
I am using following laravel package : https://github.com/artesaos/laravel-linkedin
To fetch feeds:
$posts = LinkedIn::get('v2/activityFeeds?q=networkShares&count=2');
I am getting following error:
array:3 [▼
"serviceErrorCode" => 100
"message" => "Not enough permissions to access: GET-networkShares /activityFeeds"
"status" => 403
]
In App setting there is no such to give permissions. Below is the screenshot: https://www.awesomescreenshot.com/image/3644392/6f92b88a7d73be3545126b88d49234c6
for the use of the V2 you need to require a partnership with linkedin.
https://developer.linkedin.com/partner-programs
check the box of the permissions you need (you have to conduct some research into what you need).
PS: this can take up to 1+ months before the partnership is accepted
Related
LinkedIN has recently released support for webhooks and we are successful in creating a webhook url. We are able to authorise a user administrator of a company to our app and get permissions to write and read from the REST API.
However we are not receiving any webhook updates from the app for that company. And there is no documentation on how to subscribe to a particular company like in other social-media API:s witch we have vast experience from (fb,IG,Twitter).
The documentation on LinkedIn is very limited on the subject. And we are not sure what we can expect from the webhook requests from linkedIn. What is the reason we are not getting Webhooks for that company?
We dont even get webhook calls for the organisation owning the app.
Any help appreciated.
https://learn.microsoft.com/en-us/linkedin/shared/api-guide/webhook-validation?context=linkedin/context
I figure it out I need to add header json to output for validation.
Here is my code in php
if (isset($_REQUEST['challengeCode'])) {
header('Content-Type: application/json');
echo json_encode([
'challengeCode' => $_REQUEST['challengeCode'],
'challengeResponse' => hash_hmac('sha256', $_REQUEST['challengeCode'], 'client secret'),
]);
exit;
}
and for webhook subscription
$api->setApiHeaders([
'X-Restli-Protocol-Version' => '2.0.0',
]);
$developerUrn = urlencode("urn:li:developerApplication:developerid");
$personUrn = urlencode("urn:li:person:personid");
$orgUrn = urlencode(""urn:li:organization:pageid");
$endpoint = "(developerApplication:$developerUrn,user:$personUrn,entity:$orgUrn,eventType:ORGANIZATION_SOCIAL_ACTION_NOTIFICATIONS)";
$api->api("eventSubscriptions/$endpoint", ['webhook' => "WEBHOOK_URL"], 'PUT');
Webhooks are a closed beta feature at this time:
Who can use this: Any developer using a webhooks API (currently available only for social action notifications on company posts to beta partners)
Source: https://learn.microsoft.com/en-us/linkedin/marketing/integrations/recent-changes
We recently obtained the r_ad_campaigns permission to work with the LinkedIn V2 API:
https://developer.linkedin.com/docs/lms/marketing-analytics/quick-start#
https://developer.linkedin.com/docs/guide/v2/shares/network-update-social-actions
To work correctly, I have obtained a new TOKEN with the new permission: r_ad_campaigns
I have made the following 3 calls with this new token:
https://api.linkedin.com/v2/socialActions/{share URN}?oauth2_access_token=TOKEN
https://api.linkedin.com/v2/socialActions/{share URN}/comments?oauth2_access_token=TOKEN
https://api.linkedin.com/v2/socialActions/{share URN}/likes?oauth2_access_token=TOKEN
And they all return the same result:
{"serviceErrorCode": 100, "message": "Not enough permissions to access: GET / socialActions / {share URN}", "status": 403}
The same thing happens with these post:
Why does LinkedIn v2 Share API give not enough permissions error on any v2/shares endpoint?
LinkedIn V2 API permission for reading socialActions and Shares
Please, does anyone know how to solve this problem and that it works correctly? Is it important.
It's working in my case, this problem related to permission
Follow these steps,
Open Url, https://www.linkedin.com/developers/apps/
Goto products
Select all products
Marketing Developer Platform Product need some days to be approved
If all products are successfully installed
Check OAuth 2.0 scopes permissions to access data using your app
earlier in 2015 i started creating a website with drupal 7 that imports instagram-content (images, likes, comments etc.) via Drupal Feeds. Everything worked finde, but the projects stopped then.
Now it seems we start that again but suddenly the import is not working anymore. I always get the following error:
{"meta": {"error_type": "OAuthPermissionsException", "code": 400,
"error_message": "This request requires scope=public_content, but this
access token is not authorized with this scope. The user must
re-authorize your application with scope=public_content to be granted
this permissions."}}
I didnt had to send the "public_content" earlier, so i was just sending "basic"-scope access. And as i said, everything worked well.
Now i inserted also the scope for "public_content" along with "basic" within the oauth-Module for feeds. But still getting the error-message above.
Any hints on that?
Thanks in advance and regards,
Fab
This is due to a Instagram Platfrom Update
You'll have to add public_content scope as Joshi has pointed out - and also you'll need to renew your auth token in the settings page.
Then you'll be good to go.
Here is the solution:
Use following code in instagram_social_feed.module
Function: instagram_social_feed_settings()
if (variable_get('instagram_social_feed_client_id', '') != '' && variable_get('instagram_social_feed_redirect_uri', '') != '') {
$form['authenticate'] = array(
'#markup' => l(t('Click here to authenticate via Instagram and create an access token'),
'https://api.instagram.com/oauth/authorize/?client_id=' . variable_get('instagram_social_feed_client_id') . '&redirect_uri=' . variable_get('instagram_social_feed_redirect_uri') . '&response_type=code&scope=public_content'
)
);
}
This will solve the issus
I am attempting to configure Drupal CMIS to connect to the Alfresco public test repository.
I am using this CMIS module
https://www.drupal.org/project/cmis
I am using Alfresco 4.x CMIS Content Repository as found here
https://www.alfresco.com/cmis
The problem is that when i try to browse the repository in drupal I get the following message
There has been an problem contacting the CMIS server, please see the logs.
The error log always reads
HTTP call to [repository link here, shown in code sample bellow] returned [307]. Response: Authentication Required Authentication Required
my Drupal settings file contains the following
$conf['cmis_repositories'] = array(
'default' => array(
'user' => 'admin',
'password' => 'admin',
'url' => 'http://docs.oasis-open.org/ns/cmis/ws/200908/'
)
);
The config is copy/pasted from the modules documentation and includes the URL which appears in the error message. Also I have viewed the $conf global using print('' .print_r($conf,true) . '') so I definitely have settings.php correct.
is my admin, pass, url combination still valid (ie is the site up to date)
what else could be causing this?
Your url seems to be wrong.
Please try with http://cmis.alfresco.com/cmisatom (Atompub ) , http://cmis.alfresco.com/cmisbrowser (json)
Links are there in the alfresco web link mentioned by you
cheers,
Saurav
I was trying to get summary of connections using omniauth-linkedin gem
here is the configuration details on the same
Code
:scope => 'r_fullprofile r_basicprofile r_emailaddress r_network',
:fields => ["id", "summary","positions", "location:(name)", "email-address", "first-name", "last-name", "headline", "industry", "connections:(headline,first-name,last-name,summary,interests,skills,educations)"]
But Linkedin API returning only headline, firstname and lastname .
Is there anyway I can get details ?
Please read the documentation for the Connections API.
As is stated in the documentation:
"For 1st degree connections, you may only retrieve profile fields available with the r_basicprofile member permission"
interests, skills and educations are not available with the r_basicprofile permissions.
The summary field is available with the r_basicprofile permission, but the documentation notes
"Not available via connections API."
This is why you are unable to get these fields when you make the call you provided.