Automatically repost WordPress post on LinkedIn Articles - wordpress

A client is asking for an option to automatically repost/copy a published post from WordPress to a LinkedIn article since there's a different audience watching both feeds.
Most created WordPress solutions only facilitate sharing a link to the website post on the standard feed and from what I can find at https://developer.linkedin.com/docs/guide/v2/shares/articles-api there seems no option to create articles through an API, only retrieve and delete them.
I was wondering if I missed something or if at the moment it's not possible to create LinkedIn articles through the API. Thanks.

so because you speak of a client. i will take this as a hint that the article needs posting on the company page.
you should read the following page:
https://developer.linkedin.com/docs/company-pages
this page contains all information regarding managing company pages including adding posts.
There are two methods for sharing content via the REST API. The API endpoint is the same, regardless of the method you choose — only the format of the request body differs.
Post a plain text comment. Note that if the comment includes a
fully-qualified URL in it, LinkedIn analyzes the included URL and
automatically identifies the title, description, image, etc., to be
used as part of the share. Share with specific values — You provide
the title, description, image, etc., directly in the body of the
request.
NOTE:
you cannot use the V2 api's without a partnership with linkedin. the link i provided is for V1 api. this api is for free use. if you necessarily need the V2 then just post a comment and i will explain the proces of the partnership.

Related

LinkedIn Community Management API create an article post with a link preview

Recently our app was able to create LinkedIn posts via UGC Posts API and the URL preview functionality worked perfectly for the article post type when the source URL was provided. But after we migrated to the new API it seems that it is not possible anymore according to
https://learn.microsoft.com/en-us/linkedin/marketing/integrations/ads/advertising-targeting/version/article-ads-integrations?view=li-lms-2023-01&tabs=http
Article Post API does not support url scraping for article post creation […] it. Instead, API partners need to set article fields such as thumbnail, title and description.
Is there any workaround for that except parsing those fields by yourself and providing them with publishing request?
I've tried to pass only source url with an empty title (both fields are required) in a post creation request, but the result article was crested with that provided data only - so no image was recognized.
I tried to use the link in another posts type but it seems not working, so there is no workaround you should scrap the link yourself or take the information provided by the user and fill in the object
{
"source":"",
"title":"",
"description":"",
"thumbnail":""
}
And this is mentioned in the docs,
Posts API does not support url scraping for article post creation as
it introduces level of unpredictability in how a post is going to look
when API partners create it. Instead, API partners need to set article
fields such as thumbnail, title and description within the post when
creating an article post. To create an article post with thumbnail
image, please use Images API to upload thumbnail image and use the
ImageUrn on thumbnail field. For more info, please refer to
ArticleContent API.
https://learn.microsoft.com/en-us/linkedin/marketing/integrations/community-management/shares/posts-api?view=li-lms-2023-02&tabs=http#article-post-creation-sample-request

How to fix blog post collecting in Google Analytics

We have a blog..
Earlier the article URLs were as follows:
sitename.com/blog/article-name.aspx
and were automatically grouped by Google Analytics (Behavior - Site content- Content drilldown). Each URL had a /blog/ part, so the grouping was perfect.
Now all the blog article URLs are sitename.com/article-name
So they are not grouped in "Content drilldown (/blog/ was removed from the URL structure). We can't put it back.
Also URL parameters (fbclid and some other) make doubles of blog pages.
In Nov-Dec we updated the CMS, now we don't have any .aspx in URLs
But some of the articles were published earlier, so we changed the URLs from "/article.aspx” to “/article”
What we need:
Well-done report (similar to Content drilldown) containing all the blog articles. Not just URLs, but page names (from page title).
All new articles should be automatically added to this report.
URL parameters should be ignored.
Make it like Article stats = older article stats (/article.aspx) + new article stats (/article)
How can we make this?
Are you able to identify an article as opposed to a none article from a dev point of view?
Pass a custom dimension with the hit for articles, then use that custom dimension to create the report.
Ask the developers to add in a dataLayer variable on the pageview, or a local js variable you can use to identify a pageview type as "blog" or "whatever" and send that with the analytics hit.
Content group i guess will be the easiest and best option in your case: https://support.google.com/analytics/answer/2853546?hl=en Check: "Create a Content Group via the tracking code" section on this page (developer help will be needed).
Of course as ASomN said: sending additional custom dimension (with pageview hit) will be nice addon.

Using OpenGraph to pull content onto my site?

So a company I'm working with gets mentioned in the media from time to time (BBC & other big news sites).
Is anyone aware of fees / licenses we will need to use the content that BBC etc provides using OpenGraph and post that content on our site?
So essentially we want a little card on our site with the page title, OG image, URL and possibly the description, when the user clicks this it will open the original page/link on the original source site.
I can't see too much info out there other than sharing on facebook, not using OpenGraph on our site.
Can anyone share some knowledge? Cheers!
If I get your question correctly, you want to retrieve posts on the BBC site, scrape the information and show in your own site, right?
Does the site of BBC, and possible others, provide a feed where you can subscribe to? In that case, you could monitor that feed for any mentions of your company.
Alternatively, you can use one of Facebook's partners that use the Keyword Insights API. There you can set up monitoring for your company name and integrate with their API.

How to get news from another website via RSS

I have a blog and I want some automatically - generated news on it. I have found a few news websites which generate RSS feeds and I want to auto-post them to my blog.
I have done this using the WP-o-Matic plugin, but since the RSS feed's content is limited to some point, the entire news' text does not show up on my blog.
Is there a way to get the whole content of the post the RSS feed is linking to ?
You're going to have to code this yourself. Let's say you subscribe to an RSS feed for Google News. You can parse their feed to get the original URL of the summarized article, but then you're going to have to make a request to that URL and fetch the content on that page. Unless the source happens to make whole articles available via its own RSS feed (unlikely), you're probably in markup-scraping territory.
Have to say this: consider the ethical/legal implications of duplicating entire original content on your site (as opposed to summary snippets), even with proper attribution.
For people that need a solution to the problem I described ..
There are services like:
http://fulltextrssfeed.com/
http://fullrss.net/
http://www.wizardrss.com/
You can use them to do the job for you. They fetch the RSS feed, crawl the websites and extract the full articles for you. After that, they provide a RSS feed of their own with the extracted data.
You can combine the extracted data (the RSS feed the service provides you with) with a wordpress plugin like WP-o-Matic. That way the plugin connects to the RSS feed of the service and the service extracts the content from the original RSS feed.
Have in mind that those services are not perfect. Due to complex website layouts, these services might be unable to find the content, or include things that are not a part of the articles. A manual check of the output is advised.
To the services alrady listed at the top, you can also check http://www.FeedsAPI.org , FeedsAPI brings to the table that it takes the process of posting the articles directly to your secret blog email for you, so all you need to do is manage the publication in the wordpress admin, and you can also get it targeting a specific feed to receive the results you want. Anothe alternative will be the combinations of one of those services with IFTTT . I hope this could help.

post comment for an url programmatically in facebook

Is there a way to post a comment for a given url programmatically in facebook?
I am not sure you can do that by simply passing a variable in a url, but you may be interested to learn more from their developer section. For open graph, I see on the Facebook Developer site that you can only implement LIKES but not comments.

Resources