Linkedin - Get companies updates queries - linkedin

I'm trying to create an app to read company updates, but I have a few queries. Please help...
I'm using LinkedIn api via Oauth authentication in R
Is there anyway to fetch more updates than the restriction (only allow fetch up to 250 updates or updates in the last 20 days whichever comes first) ?
Example code
https://api.linkedin.com/v1/companies/270126/updates?event-type=status-update&count=100&start=0 &oauth2_access_token={access_token}
Once I got the updateKey, I'm trying to fetch the comments and likes but it's returning NO return
Example code
https://api.linkedin.com/v1/companies/270126/updates/key=UPDATE-c270126-5951438751136768000/update-comments?event-type=status-update&oauth2_access_token={access_token}
https://api.linkedin.com/v1/companies/270126/updates/key=UPDATE-c270126-5951438751136768000/likes?event-type=status-update&oauth2_access_token={access_token}
From the company status-update, it's returning FALSE for is-commentable and is-likable? Is that why there are no result from Query 2. If so, is there anyway to change that setting?
'is-commentable' false '/is-commentable'
'is-likable' false '/is-likable'
Any help would be greatly appreciated!!!!
Linkedin developer - Reading Company Shares link
https://developer.linkedin.com/reading-company-shares

Try using the Share and Social Stream end point instead of the Companies end point like this:
https://api.linkedin.com/v1/people/~/network/updates/key=UPDATE-c270126-5951438751136768000/update-comments?oauth2_access_token={access_token}
The documentation is here:
https://developer.linkedin.com/documents/commenting-reading-comments-and-likes-network-updates
Also you can test different Linkedin API calls here:
https://apigee.com/console/linkedin

Related

Google calendar API: Copy conference data not working

We are trying to copy conference data from one event to other but it not working for non G-suite accounts. We are using Google.Apis.Calendar.v3 libraries for .net. Following is sample code :
Event firstEvent = service.Events.Get(calendarId, "eventId1").Execute();
secondEvent.ConferenceData = firstEvent.ConferenceData;
The same code works for G-suite accounts. Is there anything special that needs to be done for non Gsuite accounts or its not supported for them? May be we are missing something. Actually issue is instead of copy conference data it gives new conference data i.e new link, new signature even if same object is set to copy. It should give same link, same copy ConferenceData after creation, isn't it?
Any help will be appreciated. Thanks in advance!
References :
https://developers.google.com/calendar/create-events
https://developers.google.com/calendar/v3/reference/events/insert
This is an intended behavior. New events with attendees create a Conference automatically, so it's not possible to change it with the API. G Suite users don't have this limitation and can disable this option from the Admin console.

Firebase Storage : Get the token of the URL

I currently have an application that works with Firebase.
I repeatedly load profile pictures. However the link is quite long, it consumes a certain amount of data. To reduce this load, I would like to put the link in raw and only load the token that is added to the link.
To explain, a link looks like this: “https://firebasestorage.googleapis.com/v0/b/fir-development.appspot.com/o/9pGveKDGphYVNTzRE5U3KTpSdpl2?alt=media&token=f408c3be-07d2-4ec2-bad7-acafedf59708”
So I would like to put in gross: https://firebasestorage.googleapis.com/v0/b/fir-developpement.appspot.com/o/
In continuation: “9pGveKDGphYVNTzRE5U3KTpSdpl2” which is the UID of the user that I recover already and the or my problem this poses: “alt = media & token = f408c3be-07d2-4ec2-bad7-acafedf59708” which adds randomly for each photo .
I would like to get back only this last random piece …
Is it possible ?
Thank you
UP : 01/11 Still no solution
It's not supported to break apart and reassemble download URLs. You should be treating these strings as if their implementation details might change without warning.

Two wordpress database with same users

I want to have the same WordPress users in two different databases
For example, if a user registers on SiteA, then he can login to SiteB. And reverse.
Also i want create same cookie for both after login.
mywebsite.com/ (SiteA_DB)
mywebsite.com/blog/ (SiteB_DB)
I've never done this before and maybe Wordpress has hooks to archive this, but I prefer using mysql for such a trick.
You could try ..
.. using 'federated storage' ( https://stackoverflow.com/a/24532395/10362812 )This is my favorite, because you don't even have to share a database or even the mysql serverThe downside is, that it doesn't work with db cache and uses an additional connection.
.. creating a 'view' ( https://stackoverflow.com/a/1890165/10362812 )This should be possible when using the database-name in the query itself and it would be the simplest solution if it works. Downside: The 2 tables have to share the same mysql-server and have to be assigned to the same user as far as I know.
-- **Backup your database before trying!** --
DROP TABLE `second_database`.`wp_users`;
DROP TABLE `second_database`.`wp_usermeta`;
CREATE VIEW `second_database`.`wp_users` AS SELECT * FROM `first_database`.`wp_users`;
CREATE VIEW `second_database`.`wp_usermeta` AS SELECT * FROM `first_database`.`wp_usermeta`;
This should work, according to: Creating view across different databases
.. creating a 'shadow copy' ( https://stackoverflow.com/a/1890166/10362812 )Works with caching and is a standalone tableDownsides as 2. solution + a bit of setup and I think it might be the worst option in performance
This were answers to this question: How do I create a table alias in MySQL
I merged them together for you and made them fit your use-case.
Please also notice, that solution 1 and 2 will replace your current user-tables auf "second_database" because you write directly into "first_database" when querying the fed. storage or the view. This can lead to problems with user-role plugins. You should take care of syncing the plugin-options too, if you should use one of them and in case it uses different tables or 'wp_options' values.
Let me know if this works, I have to do a similar task next week. While researching I found the linked answers.
EDIT: I was missing the point of "cookie-sharing" in my answer. Your example shows a blog on the same domain - you should be able to change the way wordpress sets its cookies to be domain-wide. What I did once for 2 different domains was, that I hooked into the backend (is_admin) and added a javascript which did a post-request to siteB, receiving a token which is stored but marked as 'invalid' on siteB. This token then was passed back to my plugin on siteA which checked if the user is logged_in and (in my case) have adminrights (current_user_can()) and if so, it was sending this token back to sideB which was marking this token as valid to login. (Make sure only sideA can tell sideB to make this token valid!) Once a user is seen with this token in a cookie on siteB, the user is logged-in automatically in the background. Also I made this bidirectional. I am sorry, that I can't share the code for you. I don't have access to it anymore.
Greetings, Eric!

How to display the output that Microsoft Graph API returns

In running the graph API that is given as sample: https://graph.microsoft.com/v1.0/me/, it returns an output in the screen
What info is it returning and how can I use it in a user interface....
The easiest way to see what info is returned and try out different calls is to use the Graph Explorer at https://graph.microsoft.io/en-us/graph-explorer.
Otherwise, check the documentation at https://graph.microsoft.io/en-us/docs.
That API endpoint (https://graph.microsoft.com/v1.0/me/) return the user profile.
Here is the detail: https://graph.microsoft.io/en-us/docs/api-reference/v1.0/api/user_get
You can use the information however you wish on your client (e.g., display list of current licenses, display user information for confirmation and updates, etc.). Other user-related methods are here: https://graph.microsoft.io/en-us/docs/api-reference/v1.0/resources/user

I want to port my delicious bookmarks to my website

I started building a app that will automatically download my delicious bookmarks, and save to a database, so they I can view them on my own website in my favoured format.
I am forced to use oAuth, as I have a yahoo id to login to delicious. The problem is I am stuck at the point where oAuth requires a user to manually go and authenticate.
Is there a code/ guidelines available anywhere I can follow? All I want is a way to automatically save my bookmarks to my database.
Any help is appreciated. I can work on java, .net and php. Thanks.
Delicious Provides an API for this already:
https://api.del.icio.us/v1/posts/all?
Returns all posts. Please use sparingly. Call the update function to see if you need to fetch this at all.
Arguments
&tag={TAG}
(optional) Filter by this tag.
&start={#}
(optional) Start returning posts this many results into the set.
&results={#}
(optional) Return this many results.
&fromdt={CCYY-MM-DDThh:mm:ssZ}
(optional) Filter for posts on this date or later
&todt={CCYY-MM-DDThh:mm:ssZ}
(optional) Filter for posts on this date or earlier
&meta=yes
(optional) Include change detection signatures on each item in a 'meta' attribute. Clients wishing to maintain a synchronized local store of bookmarks should retain the value of this attribute - its value will change when any significant field of the bookmark changes.
Example
$ curl https://user:passwd#api.del.icio.us/v1/posts/all
<posts tag="" user="user">
<post href="http://www.weather.com/" description="weather.com"
hash="6cfedbe75f413c56b6ce79e6fa102aba" tag="weather reference"
time="2005-11-29T20:30:47Z" />
...
<post href="http://www.nytimes.com/"
description="The New York Times - Breaking News, World News & Multimedia"
extended="requires login" hash="ca1e6357399774951eed4628d69eb84b"
tag="news media" time="2005-11-29T20:30:05Z" />
</posts>
There are also public and private RSS feeds for bookmarks, so if you can read and parse XML you don't necessarily need to use the API.
Note however that if you registered with Delicious after December, and therefore use your Yahoo account, the above will not work and you'll need to use OAuth.
There are a number of full examples on the Delicious support site, see for example: http://support.delicious.com/forum/comments.php?DiscussionID=3698

Resources