Share content to an company page on linkedin using api v2 - linkedin-api

I'm trying to publish some content in a company page on Linkedin using api v2. Reading the docs I've found two ways to share content, using ugcPosts and shares API. I successfuly shared content on a USER page using the ugcPosts. But, I cannot share a content in a COMPANY page using the ugcPosts. It looks like that using shares API I can share content in a company page. But the same documentation says that SharesAPI will be deprecated soon.
I have two questions. First, there is a way to post content to a company page using ugcPosts? If not, it is safe to use the shares API since it will deprecated soon?

You have to apply for the linkedin partner program to get the manage pages permissions.
https://business.linkedin.com/marketing-solutions/marketing-partners/become-a-partner/marketing-developer-program

Related

How to get access token of my business facebook page?

My name is Alaa and i am the IT manager of my company,
We used our facebook app and the facebook PHP SDK to share our articles automatically from the backEnd of our website to our facebook pages.
so we use the facebook graph API to retrieve the Access Token of our pages and use it in the php script.
But from February 13th, the script is not working anymore. I don't know what to do exactly, but looking on the internet, I found that we must use a new API (Marketing API) because we migrate our facebook account from default to business and we must have permissions (publish_pages, manage_pages), i want to inform you that we used the app several years without need to these permissions.
I want to add also that I can't show my business pages anymore in the list of all pages i manage (Personal and Business).
for example when i use facebook graph API to get access token of a page, i can just see my personal pages and not business pages of my company. i hope that you can anyone explain to me why?
I explain all of that on a video please click here to see it : https://www.youtube.com/watch?v=zhDerUakiNk
Thank you very much for your help.
Have you tried restarting your server? That's what fixed it for me.

Integrating Facebook with Jekyll blog

Goal:
I want to share articles from my Jekyll generated blog which is hosted on GitHub to Facebook with all the relevant info (titles, thumbnails, etc.)
Questions:
Do I need to create a Facebook app to be able to use the meta data I've included in the header in blog?
If I do need to create an app, what kind of features do I need to request to for it to work?
Would it be possible to use my business FB business page instead of an app and substitute the app ID for the admin ID?
Current Status:
FB page:
https://www.facebook.com/carolyncodes/
My blog:
http://carolyncodes.com/

Get consolidated facebook comments from plugins via API - as in moderation tool

We have a comments plugin on many of our website pages and would like to be able to retrieve all of the posted comments on the entire site and be able to filter them by the page on which they were posted as the comments are page specific.
All of the comments can be accessed via the url https://developers.facebook.com/tools/comments?id={APP_ID} but I need to be able to access this list via the API.
I realise that we can get the comments when we have the url of the page or the object_id of the plugin. The problem is finding all of the object_ids/urls that we have associated on our site in order to use these comment searching methods.
Other than maintaining a list of all urls that we know have the plugin present, is there any way of dynamically maintaining this list through the api?
All pages have the same associated app_id and are in the same domain.

How do I query links shared by Facebook Pages?

I can get a user's page/likes list using the graph /me/likes. But how can I return a list of links shared by these Pages?
For example, let's say a user likes the Facebook Platform Page. I can pull this id (19292868552) using the /me/likes graph api. But how can I pull the links that the Facebook Platform Page has shared on their page?
For a regular user you would do something like this:
Sample FQL:
SELECT link_id, title, summary, url FROM link WHERE owner IN (19292868552);
But for Facebook Pages (like the above Facebook Platform Page example), this returns null. But the actual Facebook Platform Page shows dozens of links (at least). How can I get the links shared by these pages?
You can test it here:
FQL Query Test Console
I'm a little late to the party here, but I thought I'd post my gist example here. fbconsole makes it fairly simple to extract data through the Facebook Graph API to address this issue.
The caveat is that it was not terribly easy to programmatically extract data through fbconsole so I wrote the fbconsole.automatically_authenticate to make it much easier to access this information in a systematic way. This addition has not yet been incorporated into the master branch of fbconsole (it was just posted this morning), but it is available here in the meantime for those that are interested.

Streaming Facebook Pages Wall (not just the pages posts)

I have looked on 100 forums looking for a simple answer for how to stream every post on a Facebook page's wall (not using the like box for just the pages posts, but everyone's posts). I am the admin of the page and I am already using the like box for my posts so I understand that, however the developer pages of Facebook are too confusing for such a simple task. I will be inserting the stream into an HTML page which will be hosted on www.1and1.com so it can handle most, if not all code.
I know it is a lot to ask but is there evem someplace online that will offer plain step-by-step instructions for my specific needs?
If the social plugins they make available aren't sufficient, you could just pull in the feed with the Facebook graph api using the javascript sdk (easiest) or there is probably an SDK for whatever programming language you know. For example, you can see a list of posts on the coca cola page using the Facebook graph explorer:
https://developers.facebook.com/tools/explorer/?method=GET&path=cocacola%2Ffeed
The /page/feed method needs an access token, but you can use the graph explorer to get an offline_access token that you can use to pull the data in. This may eliminate javascript sdk usage though unless you want to first prompt users to authenticate your application. But otherwise you would just parse the json feed that is returned in the url indicated in the graph explorer (and add your access_token to the end of the url).
Here is a good PHP tutorial on how to display a groups feed on a web page. It would be just as easy to display the posts from a page (since you are the admin)
Just replace the group ID with the page ID. Here is a link to the feed for the Facebook Platform feed graph api results. More info on FB Pages here.