Geek Out!

live.pirillo.com

More Information

Breaking Google+ (The Basics of Codes)

BREAKING GOOGLE PLUS
 
GOOGLE DOES NOT CURRENTLY HAVE AN API, I WANTED TO SEE
WHY THEY HAVE NOT RELEASED ONE AND SO I THOUGHT I SHOULD
HELP AND DO SOME RESEARCH IN GOOGLE PLUS TO HELP THEM OUT
A WEE BIT, BUT I PUT THIS BASICS OUT FOR PEOPLE WHO ARE
LOOKING TO KNOW A LITTLE MORE ABOUT HOW G+ WORKS AND IS
SETUP BUT DO KNOW, I HAVE BARELY HIT THE TIP OF ICEBERG
WHEN IT COMES TO G+, THIS IS VERY BASIC BUT I THOUGHT I
WOULD SAVE OTHERS TIME TO MAKE AN APP BY KNOWING THE
WHO/WHAT/WHERE/WHY?! :) - Google, if you see this, sorry
or you're welcome!
--------------------------------------------------------

1). Username Concept
A. Usernames seem at random and do not have anything unique except, the length.
B. The total length of each username is no more or less than 21 Characters (Count).

Find Username in URL: https://plus.google.com/<21-Char USER>

2). Username (ID) Invoking: Navigation
Q: What can you invoke in a Browser Window (in your Web-App or Mobile/Platform App) with the ID?
A: Pretty much, a lot! This would be useful in your App for the Buttons, to load a Stream (Incoming),
view photos of a person and so on, I will show you a few quickies you can use to have your App force.

1). Load the UserID Page.
A. https://plus.google.com/<UserID>; # It will auto add the "posts" string after (e.g. /posts).

2). Load the About Page.
A. https://plus.google.com/<UserID>/about

3). Load the Photos Page.
A. https://plus.google.com/<UserID>/photos

4). Load the Videos Page.
A. https://plus.google.com/<UserID>/videos

5). Load the +1's (These are the likes or kudo's he/she received)
A. https://plus.google.com/<UserID>/plusones

3). Friend Userpages: Sidebar: Recommended 3-Friends
A). On all Friend Pages (you follow) has 3 "recommended" people you should follow that your friend does.

Play Time! Find "Sharing with you (3-Recommended Friends)" in HTML.

Breakdown: Each person has unique ID, because of this, it helps us recognize a little better what code
belongs to who, if you notice, you can find every UserID in the "<div class="NM O0">" which is nested in:

<div class="dK">
<div class="cv">
<div class="NM O0">
<a href="/100817163402574613504" class="a-Y-k eK gK"
oid="100817163402574613504"><PERSON-NAME></a>

Quick Tip: class="a-Y-k eK gK", is always the class used, so technically you really could search for that class and

grab the contents after it, so it finds oid=" and strip that (and the last quote) for just getting the UserID.

Summary: The UserID is listed twice (2x) with the name, this is good because you can use your favorite web-based
programming language to search for the main class, ensure the second exists and lastly the 3rd and scan for a URL
and strip the actual HTML Hyperlink (URL) to grab the contents within the quotes from: <a href="<content-to-grab"
and next look for the string: "> so you can grab the Person's Name and make sure if you're lazy, when harvesting
the Name, make sure to strip HTML so that "</a>" doesn't get grabbed along.

4). What types of "Streams" do you have (Categories)
A. You must first navigate to your "posts" page (see section 2-1), or anything that shows your stream on the

left (What I have tested on, may work elsewhere).

Play Time! Find "Streams" you have in your account in HTML.

Breakdown: You have your friends, family, collegues, and so on normally as a "Group". To find out what names
that currently exist (by default) or you added, this is how we grab the list. Why do this? You can later go
and test each UserID against the "Circles/Stream/Groups" and categorize your UserID list.

<div id="content" class="a-m-S a-c-m-S">
<div class="a-m-C-S a-C a-m-C-wb-Qb">
<div class="a-m-mb-S d-q-p a-c-m-mb-S">
<div class="a-c-mb-S">
<div class="a-c-mb-C">
<div class="a-c-mb-C">
<div class="a-mb-k-da">
<a href="/stream/circles/p<ID>d" target="_top" class="d-k a-c-k-eb a-mb-k

a-mb-Di-k a-c-mb-Di-k">Friends</a>
Tip: Did you know you can just view ALL of the people in your Circles posts by simply executing as follows:
https://plus.google.com/stream/incoming

Summary: I know you're going to kill me and it may sort of look kind of confusing? As you see a double "a-c-mb-C"

class seems to exist and if you look even more closely, depending on how customized you made your "Circle/Groups",
you might be kicking yourself as multiple "a-mb-k-da" exist, and each one of those classes contains a different
URL ID for your Circle but what does stay the same besides the circles nested "class" is the fact that each circle
that is unique has the same class in the URL, which is "d-k a-c-k-eb a-mb-k<new line>a-mb-Di-k a-c-mb-Di-k".

Yes this class name is stupidly long and odd but good news! It appears in your script you can just scan for the

first part: d-k a-c-k-eb a-mb-k and then go in and search prior to grab the circle unique URL/ID (Look for the
<a href="/stream/circles/p<ID-HERE") but personally, I would just grab everything in the quotes and depending on the
language you use, I would do something like:

// THE BELOW CODE IS NOT COMEPLETE AND IS STRICTLY AN EXAMPLE TO ENSURE THE URL GRABBED IS PROPER BEFORE USE.
$ht = "https://plus.google.com/";
$end = $CircleID;
$output = $ht . $CircleID; // Remember to ensure NO SPACES; NOT ALLOWED NOR EXIST OR NEEDED.
echo $output; // Just to make sure the URL came out right, and note that you must define CircleID as whatever string
you may use to have a function search for that special ID.

5. View ALL the Incoming Posts of a Specific UserID

A. Just simply invoke the following: https://plus.google.com/stream/incoming/<UserID>;

6. How to Make Posts, Grab Circle Counts, and other API-like Programming Code

A. PHP 5x Programming (Web-Based)
B. Windows Phone 7 (Platform App)
C. Android OS (Platform App)

Summary: Where is the programming coding? Well, keep looking for my next release, that will give you a bit more
details about G+ and of course, my own API that I will be giving just the basics out freely. Hopefully Google won't
beat me but you can bet it will be 100% FREE and all the projects, OPEN SOURCE & downloadable.

7. Contact, Website, Whatever?

A. Email: I rather not provide that, find me on IRC (Below) or contact me via my Blog.
B. IRC Chat: irc.geekshed.com /join #chris (nickname: flyman/lance)

C. Website: My name is pretty unique, GOOGLE ME :).
D. Twitter: @LanceSeidman, I am always posting stuff, so turn off Mobile Alerts!

Views: 22

Tags: api, breaking, codes, coding, g+, google, html, knowledge, plus, program, More…right, to

Comment

You need to be a member of Geeks to add comments!

Join Geeks

© 2014   Created by Chris Pirillo.

Badges  |  Report an Issue  |  Terms of Service