light-it-labs / laravel-linkedin-share Goto Github PK
View Code? Open in Web Editor NEWThis Laravel package allows you to share content in Linkedin with the v2 API
License: MIT License
This Laravel package allows you to share content in Linkedin with the v2 API
License: MIT License
Client error: POST https://api.linkedin.com/v2/ugcPosts
resulted in a 403 Forbidden
response: {"serviceErrorCode":100,"message":"Not enough permissions to access: POST /ugcPosts","status":403}
public function callback(Request $request){
$code= $request->get('code');
$text="Murali Sending url for link";
$image = $_SERVER['DOCUMENT_ROOT'].'/47124254_1973608329422637_4904926392325505024_n.jpg';
$accss_token=LinkedinShare::getAccessToken($code);
LinkedinShare::shareImage($code,$image,$text,$accss_token);
return 'done';
}
Above code with artical sharing working well by LinkedinShare::shareArticle($code, $url, $text,$accss_token); (And notifications appeared in linked in)
Wen coming to image sharing code execution going well but image sharing notification not getting in linked in.
Please help me
many thanks for your package!
What Should be given in $code?. I'am new to laravel please help me out.
I tried adding this package to my project and it gave me the error below
Problem 1
- Root composer.json requires lightit/linkedin-share dev-master -> satisfiable by lightit/linkedin-share[dev-master].
- lightit/linkedin-share dev-master requires guzzlehttp/guzzle ^6.3 -> found guzzlehttp/guzzle[6.3.0, ..., 6.5.x-dev] but it conflicts with your root composer.json require (^7.0.1).
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
Please I will need some help
run composer installation procedure and out this error
└─ $ ▶ composer require lightit/linkedin-share
[InvalidArgumentException]
Could not find a version of package lightit/linkedin-share matching your minimum-stability (stable). Require it with an explicit versio
n constraint allowing its desired stability.
I apologize for being boring xD
Just another suggestion.
For sharing methods, there should be used access_token instead of short lived code.
Code retrieved from authorization callback url, lives for LinkedIn only 20 seconds, giving it impossible to use it to retrieve access_token on each call.
It would throw 400 error.
Hi,
great quick solution for v2!
I guess there should be added in docs to add provider in list of providers in app.php configuration as well as alias for facade,
'providers' => [ ...
Lightit\LinkedinShare\LinkedinShareServiceProvider::class,
],
'aliases'=> [
'LinkedinShare' => Lightit\LinkedinShare\Facades\LinkedinShare::class,
]
And to create linkedinshare configuration file with data for redirect_uri, client_id and client_secret:
return [
'redirect_uri' => '',
'client_id' => '',
'client_secret' =>'',
];
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.