Fetching and displaying linkedin company updates on my page - linkedin-api

I am building a laravel project, in which I wish to fetch articles from my company page on linkedin and display them there.
However, before I can consume the API, it requires me to log in as a linkedin user.
How can I get the articles without logging in?

For a nice and good workaround you should use the API, and yes you need an account for that. There are other options, they can be very slow and isn't very stable. In that case, you need to open with PHP al the content from an URL and walk through every div and use that data on your own wat.
More information about that (PHP, XPATH);
Retrieve the contents of a div from external site (PHP, XPATH)?
I hope this is relevant to your question and helps you.

Related

Facebook Connecting Accounts (PSID, ASID)

I need to connect ASID with PSID. My application needs to connect users that comment on a page (message, id, username) with a /me (id, username).
Both are under the same application. I managed to get {user-id}/ids_for_apps to convert the PSID to an ASID, but that only worked after I made the page owned by my business.
I need to get this to work without the whole page ownership thing, because I need it to be automated, because I don't know all the pages/users that will be using the application.
If anyone has any information on this, please help!
Just to clarify:
I have a live streamer oauth my app. Then a viewer oauths my app. I need to identify the viewer oauth with a comment that they leave on the page. When the viewer logs in using my app, it gives them an html control to do things to the stream through chat commands and also on the html controls. Right now, they identify themselves as two different people, because the IDs do not match. I need the html page of the viewer to have an ID that is comparable or the same as an ID from the page comment Both users use my same app. And it's only one page. *
I need to get this to work without the whole page ownership thing
Not possible.
https://developers.facebook.com/docs/messenger-platform/identity/id-matching#policy:
The API may only be used by a business to connect the IDs for that business's app or Page to another app or Page owned by and maintained on behalf of the same business. For example, service providers may not use the API to support multiple customers.
The purpose of this most likely is to limit how much data any one company can gather about users. It would not be good for privacy, if a large “service provider” could match that data across a multitude of 3rd-party owned pages.

Can google analytic API provide all info of all pages of a website?

I am new to Google Analytics. I would like to get all information (Unique and Total Visitors, Redirecting URL etc) of a Profile, which has url like www.someurl.com/profile/unique_profile_id
So I can easily have unique url for each profile, but as I am new to this. I don't know where to start.
API docs is good but confused where to start. If some can suggest small source of getting started with what i mentioned it will be very helpful.
Thanks in advance.
I come up with this query, but still I am not understanding ga:ids. This ga:id is for my home page www.mydomain.com
https://www.googleapis.com/analytics/v3/data/ga?ids=ga%3A90283827&start-date=30daysAgo&end-date=yesterday&metrics=ga%3Apageviews%2Cga%3AuniquePageviews
Let's suppose my site have 1000 user and their profile has url as I mentioned above. So what will be ids for that each profile to query.
I think you are miss understanding how the Google Analytics API works. The api returns raw data back from Google Analytics in the form of Json. It will be up to you to format that data.
What I want is that how can I access data of each page that is
currently available in my site.
I sugest you look at ga:pagepath by adding this dimension you will be able to request data by the page. for example pagepath, sessions will give you the number of sessions by the page path. You may want to try testing using the query explorer so that you can get back only the data you need.

Facebook api supports saved items?

Does the Facebook api allow you to pull the information from saved articles on Facebook to download and read it in another app?
No, not anymore. It used to be accessible until early 2016.
See also: Facebook API to read bookmarked items.
As for a manual solution, see Scrape your Facebook saved links ( scroll to the bottom of the list, paste a js to console → it generates a text list of urls). I'd guess one ccould automate that further, via a headless browser instance.
As of now they don't have an api for saved items. Read this techcrunch post for more details .
I’ve asked Facebook whether websites and Page admins will get
analytics on how often they’re Saved, which could help refine their
content and promotion strategies, and better understand what to share
on Facebook. It tells me “Not at this time.” There are currently no
plans for an API or external Save button that developers could use to
let people add to their Saved list from outside of Facebook. You also
can’t natively export from Save to other read-it-later apps, which
would be nice.

Integration of facebook to a CMS

I am currently creating a CMS for internal use. We currently have a situation where we post something on our Facebook page, and then have to copy and paste it on to our corporate website.
The thought process is now to try and use a in house built CMS to drive both the website and FB. My initial thought process is that there will need to be to way flow, i.e We need to be able to sync Facebook with our website database, but also our database with Facebook. This should not be a problem, with the Facebook-SDK I have successfully retrieved posts, links, statuses, photos we have posted to Facebook.
My problem comes in that it would be great if I could some how replicate the notification of Facebook, so that if someone likes a post on Facebook, we get a notification in the CMS also, is this possible? Can you pull notifications from Facebook?
Other points I need to consider is can I create a gallery of images on my website, and send those to Facebook to create a new gallery? Can I pull comments from facebook, show them on my site, and allow people to add to them through a comment form, but send those comments to facebook also?
Any body any experience of trying to drive facebook from an external source?
How about using iframes? It's easy to use, you only have to be logged in on facebook. I'd do something like this:
<iframe src="http://www.facebook.com/your-site-here" class="cms_block"></iframe>
You just have to look into your global.css file, what kind of class is to your cms blocks associated with. Or define it manually:
<iframe src="http://www.facebook.com/your-site-here" style="display: block; width=: inherit; height: inherit;"></iframe>
I don't think you are going to find the solution in the Facebook APIs so you'll probably need to code something yourself. You could poll the Facebook feed and send notifications when you detect them.
You might want to check out https://ifttt.com/wtf - not sure if they will be as granular as you want (to notify post 'likes') but there are various FB events you can monitor and act on. Check out some of their public recipes: https://ifttt.com/recipes/1789-tweet-my-facebook-status-updates.
I've been working on a somewhat similar problem and decided to maintain FB as CMS and pull the feeds from FB into my site rather than try to keep the two systems in sync.
Good luck and post back how you solved if you get a chance!

I am wondering if it is possible to have the facebook reviews on my website as a module

On my facebook page I have reviews, I am wondering if its possible to have this review box on my page, on my website, similar to the activity feed plugin.
I know there is not a plugin for this, but I think it would be good for my customers to make a review of my pub on my website and for it to post to facebook reviews
Bad news, page ratings can't be posted through facebook API, you can only do GET requests. So the only thing you could create on your website is a livefeed of your page ratings, if a user wants to rate your page you will have to redirect him to your facebook page.
I don't know the existence of any plugin that does that for you. But you could create your own, you just need to create a Facebook APP, you could do that easily going to https://developers.facebook.com/ and register yourself as a developer.
Since I don't know what's the language you intend to use, I'm going to post a PHP example, even if that's not the language that you are using, the logic is the same, you just need to use the SDK, in this case I'm using the official PHP SDK, for this script to work you must be admin of the page you want to query the ratings.
Also notice that I'm not posting the entire code here, I'm assuming that you have some experience, if that's not the case, don't panic, it's pretty simple to learn the basics of Facebook APPS.
You will also need to ask for the manage_pages scope, more info on other scopes here:
//get user accounts
$pages = $this->facebook->api('/me/accounts');//this gets the pages where you are the admin
foreach ($pages['data'] as $page) {
if($page['id']==PAGE_ID_YOU_WANT){
//the user is admin of the page you want
$page_access_token = $page['access_token'];
$page_ratings = $facebook->api('/PAGE_ID_YOU_WANT/ratings', 'GET', array('access_token' => $page_access_token));
var_dump($page_ratings);
}
}
I assume you are referring to page ratings/reviews for Local Business pages. Each rating information are accessible via /{page_id}/ratings as documented here.
You just need to obtain your page's access token and access the endpoint above.
Since you already have reviews on pages, your page is appropriately categorized as one, but for those who have similar problems I post how to modify page settings to have ratings and reviews.
EDIT: Sorry, you were looking for some plugin module just like activity feed. As you can see on the Social Plugins document, they don't provide ratings/reviews plugin. And if you try to implement this yourself, you need to access the endpoint as I introduced.