Showing Company Follower Count in ASP.NET Webpage - javascript

I am developing a webpage for a company which needs to show the company's linkedIn follower count. I have no idea how to implement this. Please help me out.

The question you're asking is more complicated than a simple answer can give. In order to implement LinkedIn you'll either need to use the REST API or the Javascript API. The general information on company lookup is here. In order to get specific fields, you'll also need to understand the LinkedIn Field Selectors/
In the REST API, assuming you have successfully implemented the OAuth Authentication you would make the following call (this is to get the follower count for LinkedIn, which has an ID of 1337:
http://api.linkedin.com/v1/companies/1337:(num-followers)
In the Javascript API you could do something similar with a Raw call:
IN.API.Raw("/companies/1337:(num-followers)")
If you're going to be using the LinkedIn APIs from scratch, you should work through our tutorials - we don't have any ASP specific tutorials but there is a good C# example/library linked from our Libraries and Tools page that you can work from.

Related

Google JavaScript API - need JavaScript (Angular) application to authenticate as admin account

I am attempting to create an angular application that authenticates to the Google APIs as our administrator account so that it can gather details, such as a user's Google Drive info (number of files, total size, etc.)
I'm attempting to use OAuth 2.0 to give the application our "administrator" credentials. The examples provided in the Google API documentation shows how to accomplish such tasks by allowing a user to log themselves in, but I've yet to find anything demonstrating how to programmaticly authenticate an application as admin (or anything else, for that matter).
Is this possible?
After a bit more research, I finally found a question relevant to the issue with what appears to be a detailed solution! It's all about using the right key words... "programatically" was the word that finally got me there :)
Of course, I'll be using JavaScript/Angular, not Python, but I believe the concepts will be the same.

Writing a comment onto a 3rd party facebook wall via website link

Really wracking my brains about how to do this but i basically dont even know where to start.
Basically twitter has functionality that allows a link to open a twitter box that a user can populate and then post directly onto a chosen twitter feed:
https://about.twitter.com/resources/buttons#mention
Its super simple, all it requires is changing the URL parameters of the target link.
Im trying to do something similar with facebook. Ideally a link clicked on my site would open a facebook page with a prompt for user to type their comment and login to post to the 3rd party wall. I definitely do not want to be handling any FB authentication on my end as i imagine this would be far beyond my rather novice coding abilities.
An alternative would be to capture the comment with a text box on my end and then pass this through to facebook to write onto the wall.
Ive trawled the net and stack exchange looking for solutions but most seem to be geared to putting a comment on the users wall rather than a 3rd party.
Honestly im not super active on any social media anyway so my knowledge of how they function is quite limited. If anyone could give me a steer and some possible solutions (or alternatively just out and out that it is impossible) that would be fantastic.
You can use the Facebook JavaScript SDK, and invoke the feed dialog using that.
The feed dialog has a to parameter into which you can fill the Facebook ID of the profile that you would like the user to post to. However, the profile who's ID you fill in there must have authorized the same app as the one that you initialized the SDK for. That means this approach is likely impractical.
In any event, here's a piece of example code.
If you would like to use graph API to post to a profile's timeline (using the profile-ID/feed POST endpoint), you'll have to implement Facebook Login as well. However, since Graph API v2.0 is mandatory for all apps now, you can only find those profile IDs of people who have also authorized the same app.
This is probably even less practical for you, given that you don't want to implement Facebook login.
As far as I can see, these are your only options to achieve what you are looking for at this time.

How can we extract the complete Facebook friend list using Graph API in java script?

I am trying to extract friends list of a profile. I tried looking for the help and only thing I got is, "/me/friends"
but this call has a limitation. This will only return any friends who have used (via Facebook Login) the app making the request.
I wanted to have the list of all the friends in my profile.
That´s how it works, you can´t get the full friendlist anymore. See the changelog for more information: https://developers.facebook.com/docs/apps/changelog
You can only get the friends who authorized your App too, for privacy reasons.
There are also plenty of other threads about that question already, for example:
Facebook Graph Api v2.0+ - /me/friends returns empty, or only friends who also use my app
Get ALL User Friends Using Facebook Graph API - Android

Incorporate LinkedIn to a webpage

I'm trying to create a webpage that can incorporate LinkedIn info's (profile,people,company, etc...).
The things that it can/would do are the following:
When the user enters a name that is registered in LinkedIn, he gets the following
*Name, Company, Email
*List of LinkedIn messages that are waiting for reply
The same process goes on everytime the user adds a profile, I'm planning to use the Profile API of LinkedIn to get the Name, Company and Email but I can't find a working example to be my basis.
As for the 2nd one I still don't know how to get the LinkedIn messages.
Here's my Layout and expected result.
How can I achieved this? Opinions and Suggestions are highly appreciated tnx
This is far to broad a question for me to invest the necessary time in to figure the answers (multiple) for you, but do let me give you some hints. First of all, from my experience with the linkedin API not all the data you wish to access is available (do double check this though, I used the API quite awhile back and stuff might have changed in the meantime). As this data is not available through the API the only alternative would be to somehow bypass the cross domain policy, which in conclusion would require the user to install a chrome extension/firefox plugin which will function as a proxy for your application or even 'better', make you entire application a browser plugin based web app. Not that I am a fan of those whatsoever but if you application is meant in any way whatsoever as a linkedin (dedicated) plugin (probably as part of a greater service you're developing) then it might make most sense.
The whole system you are describing is very long winded and requires a large amount of development time. Alot of the data is not accessible directly or indirectly too. You cannot get email address's out from the API as a security feature (bots could just harvest emails for marketing campaigns).
First of all, you will need to make an application that allows for oAuth2 connections with the linkedin API service. People will log onto your website, click to join their linkedin account with your website and your website will receive back an access token to do the calls.
You will then need to build the queries which will access the data you require. The linkedin API documentation (http://developer.linkedin.com/) isn't greatly indepth but it gives you a good understand and points you where you need to go. There are also a couple of pre-done php API's around such as https://code.google.com/p/simple-linkedinphp/.
I have worked with many API's from twitters, facebooks and LinkedIn's and they all require a lot of back-end work to make sure that they are secure and get the correct data.
It would take me hours to go through exactly how to do it and has taken me many hours to get a solid implementation in place and working with all the different calls available.
If you have minimal coding knowledge, it would be best to go to an external company with a large amount of resources and knowledge in the field who can do it for you. Otherwise it may take many months to get a working prototype.

Creating a facebook likebox

A client of mine (a design studio) asked me to style the like-box social plugin on their site.
As far as I know this cannot be done now with the deprecation of "css" parameter on the fbml tag.
So the route I have to take is to recreate the like-box myself using the js SDK (or php SDK), but the problem is that I cannot find the users (and their photos) that like my page. I'm searching through the opengraph explorers parameters but i cannot find anything.
Does anyone know which url I must follow in the graph api to get what I want?
Do I have to have an access token for such an action? I noticed that the likebox plugin works event if you don't have a facebook account (It shows pictures).
Thank you.
You can't recreate the like box on your own. The Facebook APIs will not return a list of users who like your object. This was done to stop people from getting user lists of likers and spamming them.
Currently, you can only query to find if a specific, authenticated user or which of their friends likes your object.
You could build something similar by populating your fake like box with images of recent posters. You would need to deal with filtering out duplicates, and the page posting as itself, but this should get you started: /PAGE_ID/feed?fields=from.name,from.picture&limit=10
You will need an access_token to get this data. I'd authenticate as an app to do it.

Categories