I am implementing some code that posts content to the user Linkedin , the request response will have the shared object ID like "6777623868333944834".
What is weird the response does not contain a url to this shared/public object. If I check the urls of this posts from the website I see urls like
https://www.linkedin.com/posts/activity-6777623868333944834-PUJ7
https://www.linkedin.com/posts/activity-6777985031844458497-h4BO
https://www.linkedin.com/posts/activity-6777947888103243776-Yy4A
so Linkedin used the ID in the url but adds this extra 4 characters at the end.
I am wondering if I can somehow get the correct url without a new request.
I am not using any special library or SDK, just doing the requests directly,
If is not possible I am not able to find the correct API and permissions I would need to get the url if I have the ID (or urn)
Related
I have created a post on my websites when I shared on LinkedIn, it's not showing complete URL of sharing.
Currently, I am using https://www.linkedin.com/sharing/share-offsite/?url=www.example.com/share/?id=12654
But When I am sharing with LinkedIn using above its redirect to below URL :
www.example.com/share
Its removing parameter which passed using id. How I can get the full URL: www.example.com/share/?id=12654
Don't forget to do URL-encoding with parameters you are feeding to another URL. So, your link should be ...&url=https%3A%2F%2Fw..., and not ...&url=https://. Your URL also contains a question mark that should be escaped. Ultimately, your URL should look like this..
https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fwww.example.com/share/%3Fid=12654
URL encoding is required any time you are sending a URL as an argument to the GET param of another URL.
In case you want to know more: Official LinkedIn Share Documentation
If you are interested in a regularly maintained GitHub project that keeps track of this so you don't have to, check it out! Social Share URLs
I want to implement an Actions for Google app that links to user account in a Firebase project and query's their data. I have a website that is set up using Firebase UI that logs them in and redirects them to a dummy page that basically just says "You have been logged in." I cannot see any documentation anywhere that shows how to return this auth token to google so the assistant can use it to query things on their account. Does anybody know how to accomplish this? I am using this documentation https://developers.google.com/actions/identity/google-sign-in-oauth?creation=no. This is the specific text I am not understanding.
"Your service creates an access token and returns it to Google by redirecting the user's browser back to Google with the access token attached to the request."
This basically means that, instead of returning a new page, you issue an HTTP redirect to a URL that they have sent you as part of the request. You will need to add some parameters to this URL that include the auth info, and this is how Google will get the information - via the redirect handled by the user's browser.
They provide some details further down in step 4 on that page, which reads
Send an HTTP response that redirects the user's browser to the URL
specified by the redirect_uri parameter. Include all of the following
parameters in the URL fragment:
access_token: the access token you just generated
token_type: the string bearer
state: the unmodified state value from the original request
The following is an example of the resulting URL:
https://oauth-redirect.googleusercontent.com/r/YOUR_PROJECT_ID#access_token=ACCESS_TOKEN&token_type=bearer&state=STATE_STRING
I am looking to fetch degree of my particular connection without API using LinkedIn federator. For e.g. I have a first degree connection named "Vivek Joshi" working in company "ABC". So, I query LinkedIn federator to find the degree which is first("1st") in this case.
Query URL -- https://www.linkedin.com/ta/federator?query=Vivek,Joshi,ABC&types=mynetwork
and I get a JSON response containing degree information. The above URL works only if user is logged in to LinkedIn.
I have asp.net application in which I have "Sign in with LinkedIn" option as available too. But when I authorize any user to LinkedIn through my application and see the response headers of the LinkedIn authorization call, there is a header named as "Set-Cookie" but it doesn't have cookie I'm looking for which is "li_at"(LinkedIn Session Cookie).
The problem is that query url mentioned above expects a request header named as "cookie" with the value of "li_at" cookie.
How can I make the above URL work?
It is not possible to retrieve this information without using the API. Access to connection data is currently available to select LinkedIn partner developers. You can learn more about LinkedIn's partner programs here: https://developer.linkedin.com/partner-programs
We use the LinkedIn API to retrieve the profile URL for our users using OAuth2.
Once we get the response from LinkedIn we store the siteStandardProfileRequest URL field in our app so other users can check the profile.
However we've seen that some of the URLs get 404's. The culprit URLs tend to have a numeric ID, while the other URLs are alphanumeric.
Is there a way to convert the numeric URLs to their alphanumeric counterparts without having to get an authorization token from the original user? Or generate valid URLs from what we have?
Thanks!
I have a contact us form in our website which would send out an email to the site admin when submitted. I would like to know from which site the user has landed onto this page and how many unique users have come here and such things... I have used Google Analytics but it sends out only information on the adword that the user has clicked. I would like to know from which site and from the user came in so that I can add this referring site when email is being sent to the site admin.
I am guessing that the referring site will always have some URL manipulation to redirect here so how can i grab that URL? or is there any other better way to achieve this?
Does the environment variable HTTP_REFERRER give what you want?
You can can begin collecting this data without adding any javascript to your Site's pages, using your server's access logs. If your server is Apache, then as long as you set your config file to record data to your access log in the Combined Log Format, then you are already collecting referrer (i.e., this is one of two additional fields appended to each line in the logfile when you specify the Combined Log Format versus the (default) Common Log Format, the other field is the user agent; both 'referer' and user-agent are taken from the respective HTTP request headers).
Another advantage of this method is that if you have been logging using the Combined Log Format, then you also have the data you want going back in time, as far back as you archive your logfiles.