About Linkedin Post Api Organization Mentions - linkedin-api

I saw that you are included in the contributors of LinkedIn Post API documents. I would like to ask one quick question: I'm trying to get posts by URN for a mentioned Organization. Doc says "use URNs such as: ugcPostUrn (urn:li:ugcPost:{id}) or shareUrn (urn:li:share:{id})". That id is posts' id? If yes, how could I know a post's id which I'm trying to collect via API. When I tried to run this with organization id, it doesn't work. I need to collect feeds which mention specific organization.
https://learn.microsoft.com/en-us/linkedin/marketing/integrations/community-management/shares/posts-api?view=li-lms-2022-12&tabs=curl#sample-request-5
I need to collect feeds which mention specific organization

Related

Can I get all posts from instagram based on a specific tag with the new Facebook Graph API?

Right now I am using Instagram API Platform with the "Public Content
- capabilities to read public media on a user's behalf" rights for my app. As it is stated on the website, it will be deprecated on December 11, 2018 and they are pointing to the new Instagram Graph API.
I went through the documentation but could not find what I need. I would like to know if it is possible with the new API to:
Get all posts info (user that posted, the number of followers, caption, likes count and the media itself). With the Mentions API from Instagram Graph API you can get all posts where your Business account is tagged #account, but they require media_id which I don't have, how do I get it?
Get all posts with a specific hashtag, of a specific user (non-business account) within a timeframe. From the comments it is clear that this is not possible for now. Still hope to get an answer to my first question.
I would like to know if the above mentioned are possible with the new API and it would be nice if you can point me to the right API. Thank you in advance
but they require media_id which I don't have, how do I get it?
You can get the list of media id's on which an account has been tagged using the tags endpoint.
v4.0/<account id>?fields=tags
Once you have the list of media items in which the account has been tagged, you can cycle through them and return the following fields each media post.
Returnable Fields: caption, comments, comments_count, like_count, media_type, media_url, owner — The ID of the user who owns the object., timestamp, username
With the owner ID of the post you might be able to look up more of the fields you are looking for, but you will likely run into some permission issues.

How to get facebook groups (not pages) feed (posts' title+content)?

I've seen many posts around most of them are about pages or with outdated information.
I need to collect the feed (let's say last 10 posts: title + content) of 2 different Facebook groups in real-time (or almost) possibly in JSON in order to get real-time notifications about new posts (e.g. via kimonolabs service, but any other solution is accepted).
How do to that?
There are no realtime updates for groups. You would need to get the feed on your own - with a Cron Job, for example.
Be aware that you can only get access to groups you manage, with the user_managed_groups permission and the /group-id/feed endpoint.
Check out the API reference for example code and all the information you need: https://developers.facebook.com/docs/graph-api/reference/v2.4/group

Retrieve specifc hashtags from Facebook using Graph API

I want to get the JSON result of all the shared posts or statuses with the hashtag of my company name #company_name. How can I proceed with this. Currently I have tried with Facebook Graph Explorer Tool using the built-in access token, but this doesn't seem to give the data.
As user WizKid (Software Engineer at Facebook) states in the comments, there is no API for hash tags.
You can search through public posts using Post search in API v1.0 but this is not possible in v2.0.

Is it possible to get all user id's who have shared a specific post, through graph api or any other resource?

I am looking for a way to record user id's of a public post for a brand. If there are any resources available, any help would be appreciated.
Retrieving share data with FB API doesn't seem to be officialy supported by Facebook, but you can retrieve posts shares with Graph API, just do the following:
Get the ID of your post (eg. /me/posts query)
Split the ID on underscore character and get the second part (first part indentifies posts author)
Query the shares: [id_2nd_part]/sharedposts
Note that since it's not officialy supported it may stop working at some point in the future
You can test it with Graph explorer - to get shared posts you need read_stream permissions on your access token if I'm not mistaken

How to use Facebook api to search for users

As the title says i want to search with Facebook Api (Graph Api or FQL, that doesnt matter, or even REST) for users.
For example: I want to search for "Britney Spears" and i want to get all users with that name (like %search%).
The result should be like http://www.facebook.com/search/results.php?q=britney%20spears&init=quick&tas=0.8058435615324403&type=users
you can use the search API from the Graph API for a particular user like this:
People: https://graph.facebook.com/search?q=USER_NAME&type=user
If you want to search for a list of users, you can you this:
SELECT uid, username, name, pic_square FROM user WHERE contains("Joe Biden")
Refer official user table docs to see all the fields you can query
But the CONTAINS() function is known to be mysterious and no one from facebook has clarified it yet. It might work in some cases and others it might not.
see thread: Documentation for CONTAINS() in FQL?
I guess the final answer would be that you cannot replicate the facebook search functionality like the site does (searching all users of a given name). You can only search users related to the current logged in user who is using your app since these are the type of social apps that facebook wants developers to build. They want you building apps that provide value to their users by utilizing their social graph of their friends and relatives. Developers don't need site wise search for this I suppose, hence there is no API to do this (yet).