Linkedin API: how to use my login credential in my access token - api

I'm building my website to pull out my own linkedin profile info. And it is working but when a visitor comes to the site, they will have to login to see my profile info displayed on my page. This should be a public website and I don't want visitors to log in to their linkedin account in order to see my public page.
Is there anyway to do this (so that visitors can see my info without having to be logged in) ? Thank you
NOTE: I'm using their REST API by the way.
Simple code

Per the documentation (section #1, bullet point 3), it is not possible to share your profile information via the API without the user both authenticating your LinkedIn application that is pulling the info, and also the authenticated user then being connected to you in some way. From that document, "Each user must grant your application access to their LinkedIn network and they can only see data from their own LinkedIn network. For example, you cannot gather information about a LinkedIn member in one user's LinkedIn network and show that information to other users"
In short, the REST API is probably not the way to go to expose un-authenticate user's to your profile. What you might want to do is use one of the plugins, such as the Member Profile plugin.

Related

How to get the google sheets api credentials (client secrets, client id etc) and authorize through browser programmatically?

I am trying to authorize Sheets API v4 (including getting the credentials) through my webpage (let's suppose I have a button called "authorize google sheets"), so when anyone clicks that button they will be taken through the browser to authorize their google account (including creating credentials automatically), so that they do not have to go to console.developers.google.com/apis manually and create credentials.
Is there a way to do it or is there any way to not use credentials at all and authorize to sheets api?
I understand that you want to request some Sheets API operation to your webpage users. If that is the case, there is no need to access the users credentials. The users only need to login and approve your scopes for Google Servers to send you an authorization code to run the request. You can see a execution summary here:
First of all you would need to include the relevant OAuth 2.0 scopes in your server. Then you can ask users to login and consent your scopes. Here are the steps needed for asking for users approval, you could follow its examples as a guideline. Finally, you could use the generated tokens to call Sheets API. Please ask me any question if you have any doubt.

How to tie an account from a backend server to a google assistant user

I have a web application setup to handle webhook requests from an Actions-on-Google/Dialogflow application using the Google Assistant. Users don't need to sign-in to a google account in order to use my web application and I'd prefer to keep it that way, so that users can sign in with any email address.
I also want my users to be able to interact with my application using the Google Assistant, and be able to access personal/contextual data via the assistant (i.e. when a speaker says, "what's on my shopping list", the web app needs to be able to know what my means).
Currently, I have this working by using my web app to issue a unique short code to my user (in the web app UI) and then with an intent on the Assistant where the speaker says "My code is 1-2-3-4" and then my web app can identify the user from then on (by saving the userId from the webhook request to whatever user got the short code 1234 and then using that userId to lookup the user on each subsequent request.)
My question is, is there a better way to do this? Ideally, in my web app, I'd like to have something like an "Authorize Google Assistant" button, which would then link the user's google account to their web-app account, so that the conversation on the Assistant is seamless.
Has anyone done this before?
Thanks
This is the perfect use case for Account Linking with the Google Assistant.
From your users' perspective, they will start to use your Action. If they're doing so through a speaker and they haven't linked the account yet, they'll be directed to a mobile device to do so. On a mobile device, they'll be redirected to a page on your website where they will been to authenticate themselves and authorize your server to let them in through the Assistant. Once they have done so, they won't need to log in again, the accounts will be linked, and they'll be able to use the voice Action without further obstruction.
From your perspective as a developer, you'll need to setup an OAuth2 server (I suggest the code flow). That login process I mentioned is the first step in the OAuth dance, and will end up with you issuing a code to Google. They will then exchange this code for an Auth Token (with a limited lifetime) and a Refresh Token (which does not expire). They will periodically use the Refresh Token to get new, valid, Auth Tokens for this user. When the user issues a voice command, the Auth Token will be passed as a field in the JSON to your fulfillment server, and you can use this to verify who the user is and that they are authorized to use your service.

Twitter API: allow authenticated user to post tweets on another user's behalf

Twitter API allows to update "the authenticating user’s current status", as explained in the documentation page.
What I'd like to achieve instead is to update another user's current status. Consider a magazine's twitter account. I'd like different people to be able to update the magazine's status. Tweetdeck allows this, but it also allows a whole lot of other things like access to Direct Messages. I only want to provide certain authenticated users an interface (similar to Twitter's post-a-tweet interface) to post status and images to the shared account.
I could not find a simple explanation of how to use Twitter API to achieve the above functionality. Could someone please help?
If you have an app that implements the status update API and it is delivered to different people and they authorize the app with the magazine's twitter account, then the app will update that status. I can show an example also with code if this is what you're asking. However the main point is that, once a user has authorized the app, she/he doesn't need to be connected with the shared login any longer because the app will do that on the magazine's behalf.
BTW, similar question here: Twitter API: post on behalf of whom?
Edit
Just to summarize the comments:
The standard OAuth authentication requires the following main steps
1) to develop an app (registered with OAuth consumer key and secret) that implements the API update status 2) to install and authorize the app: during this step the onwer will be requested to enter the credentials of the passive account in a Twitter link opened with the browser, 3) then - after a fallback - the app will store the access token and any user of the app will be able to update the status without login
Once you have developed an app that can post tweets on behalf of a passive twitter account using the standard OAuth, you could make that functionality available to the authenticated users of a website.

Is there a way to verify social media links of a user

I am project owner of a community application built on Ruby on Rails: My question is about social network verifications.
We ask the user to add his/her social media profiles to his public profile of the community.
At the moment the user can simply put e.g. his/her Facebook URL to his profile, same for pinterest profile, Twitter and so on, but there is no validation for the urls, at the end of the day the user can add anything he wants, also blablabla
Is there a way to verify if his/her entries are valid?
Token, API, validation test?
Any hint is welcome,
Thank you
Most Social Networks have APIs and you can ask the user to link his account on your application to his/her account on a specific network if he/she wants to show profiles on these Networks.
For Example, you can use the Ruby Koala gem to communicate with the Facebook API. You can create a Facebook Application and link it to your website, then ask the user to grant your Facebook App the minimal default permissions, these will be sufficient to get the Facebook profile URL of the account that was acutally linked, i.e verified.

Application name on requesting login using oauth

My ASP.NET MVC has login with Google, Facebook and Microsoft. It works fine. But when the user tries to login with gmail, the next message is shown in the google login page:
IP_ADDRESS_SERVER is asking for some information from your Google Account. To see and approve the request, sign in. Learn more
Instead of showing the ip address, I would like to show the application name or the domain, something like:
MyWebApplication is asking for some information from your Google Account. To see and approve the request, sign in. Learn more
or
www.mywebsite.com is asking for some information from your Google Account. To see and approve the request, sign in. Learn more
How can I achieve that? Should I change some configuration in the application?
You need to register the application with Google.