google+ page vs profile - javascript

I have an Asp.net webpage where I would like to display google plus information of the users. The google plus IDs are stored in a database. Is there a way (javascript/C#/VB) to determine if a google plus ID is related to a page or a profile? because I have to include different g:plus codes for them. I searched the google developers page but couldn't find anything related to this. Thanx folks!

I just got figured it out how to do this. Maybe someone will face this problem, so here is the answer. There is the REST API's people get method. If the userId that you target is that of a Google+ page, there will be an objectType attribute with a value of page. You can see this in action here. Just submit the query and look at the result response. You need an api key for your requests, this key has a limitation of approx. 10000 request/day. Here you can registrate and obtain the api key.

Related

Is there any way that I can validate whether or not a Facebook page is able to post to, or is a member of, a group through the graph API?

I'm trying to allow a user to choose which page they'd like to post to a specified group from. Unfortunately, /{page-id}/groups doesn't exist. I can't select from /{group-id}/opted_in_members due to the fact that there are no filters, and it's not reasonable to iterate through every single page of results searching for the pageId in question when there are potentially millions of members. There doesn't seem to be a way to fetch Group <=link=> Page relationships from the API.
It seems the only way to get feedback on this from the API is to attempt to post from the page, which then gives you an OAuth if the page is not linked to the group.
Does anybody have any suggestions here?
Found the solution.
You need to get the accessToken of the page in question using /me/accounts. You then need to call /{user-id}/groups using the page's accessToken. This will give you the groups that the page is a member of.

Hubspot and Google Analytics - Pass session source and medium information

I’m trying to pass session source and medium information into HubSpot so that if a form is filled out / some other conversion event happens, I can tell where that specific session started.
From the HubSpot side, this should be a two-field solution — e.g. the session and medium get passed across into fields that update with each new visit. If a form gets filled out, it will copy the session and medium data across to more permanent fields.
The end result of this process will mean that I’ll be able to say “we got 100 people to download our ebook this month. 8 came from email, 70 came from organic search, and 22 came from social media”.
All I can say right now is “we got 100 people to download our ebook. I have no idea where they’re from.”
I would like to know if this would be possible to do using Google Analytics and Hubspot as well as some script.
Upon researching I have found these two scripts that may be relevant to this:
https://github.com/troyfawkes/dgacquisition
and this:
http://sbjs.rocks/#/
Any help would be greatly appreciated.
sbjs works great for this if all your campaigns have proper utm tags.
However, you might have set this up the other way and send a specific event to Google Analytics each time a user fills a specific form. then you can set up a goal for that event and use Acquisition reports to answer your exact question "where my conversions come from?"

Facebook API - Pages - Get names of subscribers

I want to get the names of the subscribers of my facebook Page (I want to thank them and develop a single page website who mention each of them).
I use jQuery?
I have not find anything in the doc.
There is no API to get the fans of a Facebook Page. If you mean the followers of your User profile, that is not possible either. You should actually treat them as if they would be anonymous.
Btw, you would not be allowed to put them on an external website without their permission anyway.

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.

JS API - Any way to tell if a user is posting as himself, versus posting as a Page he adminsters?

I have a basic JS API application that posts a score update for a game to both a user's wall and a Page. In testing, one person who posted was posting as a Page, rather than herself, so the post to the Facebook Page showed up as being posted by the Page she was administering, rather than her own profile. So I'm wondering if there's any way to switch the "Voice" the user is using, via the API. I saw something about a profile selector attribute in one of my searches, but couldn't get the selector to show up, so either I was doing it wrong or it's been deprecated? Any help appreciated!

Categories