I've tried to post an LinkedIn update with Json in .Net. Everything works fine until i use an special character. If i post "Financiën" to the API i get an "Bad Request". I've tried to htmlencode and urlencode but then i see the encoded version as an update. Has somebody solved this?
This is the request that fails:
{"comment":"Financiën","visibility":{"code":"anyone"}}
And this works:
{"comment":"Financien","visibility":{"code":"anyone"}}
I've got the answer, Linkedin needs encoding Encoding.ASCII for a post.
Related
I've tried to post utf8mb4 chars - like 🌸 - via share API to LinkedIn. But I always get 'illegal characters in XML' as response. Already tried to 'escape' it with CDATA, but it doesn't help.
When posting those chars in LinkedIn directly, it works. :-/
Any idea? Posting without those chars works without problems.
For me, posting utf8mb4 characters (like 😁) works fine if you use the json endpoint/format.
However, if you're posting XML, you need to convert them to their html entity values (e.g. 😁)... then it'll work.
Currently, LinkedIn only supports the url parameter in its share URL. So, you'll only be able to have a share button that shares a URL, not text. Like this..
https://www.linkedin.com/sharing/share-offsite/?url={url}
Source: Microsoft LinkedIn Share URL Documentation.
If you are interested in a regularly maintained GitHub project that keeps track of this so you don't have to, check us out! Social Share URLs
One of our apps that uses LinkedIn Login, and has been working fine for a long time, is now suddenly broken, as of yesterday. Most, but not all of our calls to the People endpoint return a 405 error. Did something change for that endpoint?
I'm making a GET, just as the documentation says, and I'm getting back "(405) Method Not Allowed." from LinkedIn. Here is the URL that I'm requesting:
https://api.linkedin.com/v1/people/~:(id,email-address,first-name,last-name,headline,industry,summary,specialties,associations,honors,skills,interests,educations,phone-numbers,main-address,picture-url,public-profile-url,following,positions,three-current-positions,location,site-standard-profile-request)
Any help or any links to recent LinkedIn API changes would be appreciated. I can't find any reference to any changes there in the last couple of days, but our app suddenly broke and we didn't change anything on our end. Anyone?
LinkedIn made some unannounced changes yesterday which has broken their oAuth endpoint. They still haven't mentioned it of course.
You can see a workaround here:
POST https://www.linkedin.com/uas/oauth2/accessToken HTTP/1.1 results in Method Not Found on LinkedIn
We have solved this fix adding the request header "Expect" empty like this:
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:') );
Looking for some insight into how to get video information using youtube's v3 api.
When passing the url, the json response I get is:
{"error":{"errors":[{"domain":"global","reason":"sslRequired","message":"SSL is required to perform this operation."}],"code":403,"message":"SSL is required to perform this operation."}}
All I'm trying to do is get basic information (title, description, etc) so I used "snippet" for the part.
Here's a sample url i'm using:
http://www.googleapis.com/youtube/v3/videos?id=Ho4XgLj40Ss&part=snippet
I have tried creating an API Key and adding &key={my_api_key} to the end of that url.
If the environment matters, I'm using a jquery getJSON request in a custom Wordpress theme.
I should mention that in the "try it now" section in the documentation, it returns a nice json object - with the OAuth off.
I had the same problem for another API.
As SLaks pointed out in the comments, just use https:// instead of http://
In your case, try :
https://www.googleapis.com/youtube/v3/videos?id=Ho4XgLj40Ss&part=snippet
Adding to #Xavier's answer, if you are using this API in a Flutter environment, then you can change your
Uri.http(baseUrl, endPointUrl, parameters);
to
Uri.https(baseUrl, endPointUrl, parameters);
Notice the https above.
I'm trying to invoke the below URL:
https://api.linkedin.com/v1/people/~:(id,first-name,last-name,industry,skills)?oauth2_access_token=blabla
When I make the call directly from the browser it works fine, but if I call it using cfhttp request I got 404 Not Found error.
The issue is most likely related to url encoding, kindly advise how send the request using cfhttp or another method without being enforced to be urlencoded
The problem is that the cfhttp enforce encoding of the URL. I found a function on the below blog that can be used to replace the cfhttp
http://coldfusion9.blogspot.gr/2012/03/custom-cfhttp-tag.html?showComment=1366715001465#c172925816683016138
I am using CakePHP "HttpSocket" class to post information to a Paypal payments server. My code is working fine when the target URL is http://www.something.com, I can parse the response as I would like.
However, when I am trying to post data to PayPals payment API URL (on HTTPS) I get no response whatsoever.
I have tried the same code on other HTTPS URLs, again no response.
What is the reason for this problem?
i had the same problem as you... i seem not able to get any response from the Paypal API.
But I found out I just did something wrong. I was actually just doing a POST to https://www.sandbox.paypal.com, when in fact it should be https://www.sandbox.paypal.com/cgi-bin/webscr.
I realized this when I checked the $HttpSocket->response attribute of CakePHP, and I found out I've been getting 301 errors. Then I realized--it should not be on the base URL...
I then re-read the IPN Guide, and upon reviewing the sample codes there... voila! I realized my mistake.
Hope other people who uses CakePHP can benefit from this one. Took me long hours before I realized this one.
I realize this is over 2 years old, but I recently came across this issue and here's how I solved it:
You need to specify the port 443 along with the URL like so:
$httpSocket = new HttpSocket();
$httpSocket->get('https://domain:443/sample/path', array('q' => 'example'));
You can also pass the port and the host together in the third param, or use the request() method instead.
Hope this helps someone!