f



Getting error while getting Google plus posts

Hi,
     I am using the following code to get the Google Plus posts,


import com.google.api.client.googleapis.auth.oauth2.GoogleCredential;
import com.google.api.client.http.HttpTransport;
import com.google.api.client.http.javanet.NetHttpTransport;
import com.google.api.client.json.JsonFactory;
import com.google.api.client.json.gson.GsonFactory;
import com.google.api.client.json.jackson.JacksonFactory;
import com.google.api.services.plus.Plus;
import com.google.api.services.plus.PlusScopes;
import com.google.api.services.plus.model.Activity;
import com.google.common.base.Preconditions;
import com.google.common.io.Files;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.net.URI;
import java.nio.charset.Charset;
import java.security.PrivateKey;
import java.text.*;
import java.util.Properties;

import redegg.redcals.update.View;

public class Test {

  /** E-mail address of the service account. */
  private static final String SERVICE_ACCOUNT_EMAIL = "801283043278-
ek42r1e5ulsvdremass1huh7rtcq16lp.apps.googleusercontent.com";

  /** Global instance of the HTTP transport. */
  private static final HttpTransport HTTP_TRANSPORT = new
NetHttpTransport();

  /** Global instance of the JSON factory. */
  private static final JsonFactory JSON_FACTORY = new
JacksonFactory();

  private static Plus plus;

  public static void main(String[] args) {
    try {
      try {

      GoogleCredential credential = new GoogleCredential.Builder()
              .setClientSecrets("801283043278-
ek42r1e5ulsvdremass1huh7rtcq16lp.apps.googleusercontent.com",
"1BgzhV28ie_EXF7AD4Xf3y75")
        .build();
        plus = new Plus.Builder(HTTP_TRANSPORT,JSON_FACTORY,
credential).build();

         getActivity();
	        // success!
	        return;
	      } catch (IOException e) {
	        System.err.println(e.getMessage());

	      }
	    } catch (Throwable t) {
	      t.printStackTrace();
	    }
	    System.exit(1);
  }

   /** Get an activity for which we already know the ID. */
    	private static void getActivity() throws IOException {
      String activityId = "z12stbfxcpmkuthac04ci3gjvoywglkwx0k";
      Activity activity = plus.activities().get(activityId).execute();

     System.out.println("id: " + activity.getId());
     System.out.println("url: " + activity.getUrl());
     System.out.println("content: " +
activity.getObject().getContent());
    }
}

While running this code  I am getting  the following error,


403 Forbidden
{
  "code" : 403,
  "errors" : [ {
    "domain" : "usageLimits",
    "message" : "Daily Limit Exceeded. Please sign up",
    "reason" : "dailyLimitExceededUnreg",
    "extendedHelp" : "https://code.google.com/apis/console"
  } ],
  "message" : "Daily Limit Exceeded. Please sign up"
}

Could any one please help me to fix this error.

Thanks in Advance!

0
vijuitech (9)
6/27/2012 2:32:13 PM
comp.lang.java.programmer 52714 articles. 1 followers. Post Follow

5 Replies
888 Views

Similar Articles

[PageSpeed] 16

On 6/27/2012 7:32 AM, George wrote:

>      "message" : "Daily Limit Exceeded. Please sign up",


Here is the problem, and the solution.  My, that was easy.

0
markspace
6/27/2012 4:03:52 PM
On Jun 27, 9:03=A0pm, markspace <-@.> wrote:
> On 6/27/2012 7:32 AM, George wrote:
>
> > =A0 =A0 =A0"message" : "Daily Limit Exceeded. Please sign up",
>
> Here is the problem, and the solution. =A0My, that was easy.

can ypu please tell me what the solution is?
0
vijuitech (9)
6/27/2012 4:19:48 PM
On Jun 27, 9:03=A0pm, markspace <-@.> wrote:
> On 6/27/2012 7:32 AM, George wrote:
>
> > =A0 =A0 =A0"message" : "Daily Limit Exceeded. Please sign up",
>
> Here is the problem, and the solution. =A0My, that was easy.


Could you please tell me what the solution is?
0
vijuitech (9)
6/27/2012 4:21:49 PM
George wrote:
> markspace <-@.> wrote:
>> George wrote:
>>
>>> =A0 =A0 =A0"message" : "Daily Limit Exceeded. Please sign up",
>>
>> Here is the problem, and the solution. =A0My, that was easy.
>=20
> can ypu please tell me what the solution is?

"Daily Limit Exceeded. Please sign up"

It's not very polite to ignore the answer given and demand it again.

--=20
Lew
0
lewbloch (1508)
6/27/2012 6:43:32 PM
On Wed, 27 Jun 2012 07:32:13 -0700 (PDT), George <vijuitech@gmail.com>
wrote, quoted or indirectly quoted someone who said :

>  "message" : "Daily Limit Exceeded. Please sign up"

It looks as though you must register with Google and get some sort of
account and password that you must use it to receive these messages. I
looks as if you left it out, got it wrong or screwed up the format.
Apparently it lets you experiment a little without signing up, or
maybe the limit is 0 and this is misleading error message.

I suggest googling for code that other people have written to do this.
That is how I cracked a similar problem with an Amazon API with
monumentally incompetent documentation.

Use the names of Google-specific classes to help you find it.
-- 
Roedy Green Canadian Mind Products
http://mindprod.com
When you get stuck trying to solve a computer program: 
1. Go into the kitchen and make coffee.
2. If that fails, go for a walk.
3. If that fails, take a nap.
Why? To avoid being swamped with details, to see the big picture,
to allow in some random noise to kick you out of your thinking rut.
0
see_website (5876)
6/28/2012 7:53:59 PM
Reply:

Similar Artilces:

getting error: java.lang.NoClassDefFoundError
Hi Guys, im starting out in java and i'm getting the error: Exception in thread "main" java.lang.NoClassDefFoundError: blurf if i run "javac blurf.java", it compiles fine and without any troubles. when i try to run it (its a simple hello world program) i get the above error. i need some help :) -nat * NathanK <me@me.com> wrote: > Hi Guys, > > im starting out in java and i'm getting the error: Exception in thread > "main" java.lang.NoClassDefFoundError: blurf > > if i run "javac blurf.java", it compiles fine and with...

getting error: java.lang.NoClassDefFoundError
Hi Guys, im starting out in java and i'm getting the error: Exception in thread "main" java.lang.NoClassDefFoundError: blurf if i run "javac blurf.java", it compiles fine and without any troubles. when i try to run it (its a simple hello world program) i get the above error. i need some help :) -nat "NathanK" <me@me.com> wrote in message news:4044f218@duster.adelaide.on.net... > Hi Guys, > > im starting out in java and i'm getting the error: Exception in thread > "main" java.lang.NoClassDefFoundError: blu...

gets gets
I'm a little surprised at this. In irb, I tried puts gets gets. Why? I don't know. but basically, gets gets, seems to almost act like a heredoc! myString = gets gets puts myString On Mar 26, 2007, at 3:17 AM, John Joyce wrote: > I'm a little surprised at this. > In irb, I tried puts gets gets. > Why? I don't know. > but basically, gets gets, seems to almost act like a heredoc! > myString = gets gets > puts myString It's not surprising at all. First, let's insert the parentheses so we can see it as Ruby does: puts(gets(gets())) Now we see th...

Need help; getting error with [get]
Hi, I created a small program reading a file in using [get], and it worked fine. However today I went to try it, and got this error: "can not find channel named "filebedf90". <code from program> set fp [open $filePath] set targetFile [open brass_finished.csv w] while {-1 != [gets $fp line]} { pruneList $targetFile $line Then I tried this code in Wish, which should have given me the same error; or atleast I thought it would, until it worked. The only difference is that in Wish, i [cd]'d to the directory and opened the file from there. Whereas in my program...

Who gets higher salary a Java Programmer or a C++ Programmer?
I have little experience in both Java and C++. I have designed a few programs in both languages. I get a lot confused as many times I use Java code in C++ and C++ code in Java. So I have descided to only work in one Language. Both C++ and Java has their importance. What language should I master. I just want to know who gets higher salary a Java Programmer or a C++ Programmer? Because Learning both creates confusions So I have to Choose the best among them. Whose future is better a Java Programmer or a C++ Programmer? What else should I learn for a good Career. Should I learn C# which is ...

javax.faces.el.EvaluationException: Error getting property 'queryComponent' from bean of type org.freebxml.omar.client.ui.thin.SearchPanelBean: java.lang.reflect.UndeclaredThrowableException
HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: javax.servlet.jsp.JspException: javax.faces.el.EvaluationException: Error getting property 'queryComponent' from bean of type org.freebxml.omar.client.ui.thin.SearchPanelBean: java.lang.reflect.UndeclaredThrowableException org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java: 821) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextIm...

Getting an error in winsock I should not be getting, what else causes this?
Hi, I'm trying to figure out what would cause this error. In my code, I'm sending a buffer over UDP that contains more data than will fit in a single datagram thus the message is broken up by the OS. When sending over IPv4, all works fine, but it's failing when sending over IPv6. To diagnose what's happening, I call WSAGetLastError( ) and am returned this code number: 10004. Looking on MSDN (http:// msdn2.microsoft.com/en-us/library/ms740668(VS.85).aspx) I see that this is WSAEINTR which the explanation reads, "A blocking operation was interrupted by a call...

[debian] [apt-get] Error getting package
Hello world I'm using Debian (unstable/testing) and I can get package with the apt-get upgrade. I taped apt-get update, but apt-get upgrade tells me 404 Not found i.e. unable to get package on http://ftp.fr.debian.org/ but I searched for the same packages I want to upgrade and they are available on http://ftp.debian.org but not available on http://ftp.fr.debian.org. Is that normal ? Thanks to help me, and sorry for my English... claudio2k@caramail.com (FreeStyle) wrote in message news:<b5f5bc91.0405230757.b22ffc1@posting.google.com>... > Hello world > > I&...

get a value in the servlet with get, but null with post
Hi, I am getting a value for a hidden field in my servlet when the method of the form is GET. But when I change it to POST, I get a null value for the same field, all things remaining the same. Does anybody have any idea why this could be happening? Thanks, Shiv "Shiv" <ss_panda@hotmail.com> wrote in message > Does anybody have any idea why this could be happening? Not without seeing some code... -- Wendy in Chandler, AZ try to find article named "High-Level Network Programming ", here is one part: ".... Consider the following HTML form: ...

Google Gets Googled
Google says its mission is "to organize the world's information and make it universally accessible and useful." But it does not appear to take kindly to those who use its search engine to organize and publish information about its own executives. CNETNews.com, a technology news Web site, said last week that Google had told it that the company would not answer any questions from CNET's reporters until July 2006. The move came after CNET published an article last month that discussed how the Google search engine can uncover personal information and that raised questio...

Java Applet gets error accessing DB: (java.net.SocketPermission ... resolve)
Hi folks, I'm new about developing Java applets and I need some help. I'm developing a Web Application based on JSPs and Tomcat in Netbeans. I've also developed a Java Applet which its package has some classes. This Applet connects to a Sybase Database (JConnect) in order to query some information. It works fine when I run the Applet Class at Netbeans. The Jar containing this Applet (and the Jar supporting the DB driver) is embedded into a JSP of my Web Application through JSP Plugin tag. When I call for this JSP (where the Applet is embedded) I get this error (at the Clie...

[ace-users] proactor test example getting unknown error on open(): proactor test example getting unknown error on open()
ACE VERSION: 5.5 HOST MACHINE and OPERATING SYSTEM: HP Compaq nw8420, Windows XP SP2, not sure of the WINSOCK version. Pentium M, 2.0 Ghz, 1 GB of RAM TARGET MACHINE and OPERATING SYSTEM, if different from HOST: COMPILER NAME AND VERSION (AND PATCHLEVEL): THE $ACE_ROOT/ace/config.h FILE [if you use a link to a platform- specific file, simply state which one]: I link to config-win32-msvc.h THE $ACE_ROOT/include/makeinclude/platform_macros.GNU FILE [if you use a link to a platform-specific file, simply state which one (unless this isn&#...

how to get newline with gets?
Hello. I like the -nonewline option of puts, and wonder why there isn't a counter option in gets? The reason I need it is effectively I am doing this: set line [gets -withnewline stdin] if {[lindex $line end] eq "\r" } { # do something } if {[lindex $line end] eq "\n" } { # do something different } I guess without such an option I have to read byte-by-byte to achieve this, right? Thanks. On 5/11/11 1:21 PM, =E5=90=95=E9=9F=A6=E7=94=AB wrote: > Hello. I like the -nonewline option of puts, and wonder why there isn't= a > counter option in gets? &g...

(method="post" || method="POST") && (method="get" || method="GET")
Let's not argue about semantics. Let's talk about semasiology. Do specifications exist for using mixed case, upper case, lower case for the contents of the method employed? My own preferences lean towards the all lower-case model, simply because it reads a little easier when deployed with other XHTML semaphorings. -- Jim Carlock Post replies to the group. Jim Carlock wrote: > Let's not argue about semantics. Let's talk about semasiology. > > Do specifications exist for using mixed case, upper case, > lower case for the contents of the metho...

Return of gets gets
Not long ago I posted about gets gets I said it acted a bit like a Heredoc. I've since realized that it is actually more similar to readlines In fact, it behaves identically thus far. example: irb(main):004:0> lines = readlines ff fff akenll329 \n kls => ["ff\n", "fff\n", "akenll329\n", "\\n\n", "kls\n"] irb(main):005:0> puts lines ff fff akenll329 \n kls => nil irb(main):006:0> lines = gets gets fff ff ahoy \n lll ll => "ff\nahoy\n\\n\nlll ll\n" irb(main):007:0> puts lines ff ahoy \n lll ll => nil No...

Must GET/POST Parameters Have Values? (And What is the Syntax for GET, If NOT)
Are GET and POST parameters required to have values, i.e. are either of these legal? http://www.mydomain.com/index.php?this&that http://www.mydomain.com/index.php?this=&that= In my application, I have a GET/POST parameter that is significant just by its presence (it doesn't need a value), and rather than say this=1&that=1 I was wondering if it is legal to specify them without values. Thanks, Dave. David T. Ashley wrote: > Are GET and POST parameters required to have values, i.e. are either of > these legal? > > http://www.mydomain.com/index.php?this&am...

Getting Error in Getting Lisp shebang file to work
I recently installed SBCL on fedora Core 6. I put the following code in the sbclrc initialization file, so it is read each time SBCL starts up. This code makes it so that shebangs should work: ;;; If the first user-processable command-line argument is a filename, ;;; disable the debugger, load the file handling shebang-line and quit. (let ((script (and (second *posix-argv*) (probe-file (second *posix-argv*))))) (when script ;; Handle shebang-line (set-dispatch-macro-character #\# #\! (lam...

Java Applet gets error accessing DB: access denied (java.net.SocketPermission ... resolve)
Hi folks, I'm new about developing Java applets and I need some help. I'm developing a Web Application based on JSPs and Tomcat in Netbeans. I've also developed a Java Applet which its package has some classes. This Applet connects to a Sybase Database (JConnect) in order to query some information. It works fine when I run the Applet Class at Netbeans. The Jar containing this Applet (and the Jar supporting the DB driver) is embedded into a JSP of my Web Application through JSP Plugin tag. When I call for this JSP (where the Applet is embedded) I get this error (at the Client J...

Getting Java/Flashplayer error
When I go to Youtube my Netscape 7.2 suddenly is not playing videos and giving me message: "Hello, you either have JavaScript turned off or an old version of Adobe's Flash Player. Get the latest Flash player." I downloaded and installed the newest Flashplayer and it still gives this message and won't play any videos. Internet Explorer will play them ok. So what's wrong with my Netscape all of the sudden? Is there something I need to change in Netscape now? Iv'e also not been able to play videos at Google Video and a few other video sites too. What's up? smedl...

getting a warning about gets
I'm getting a warning on my linux gcc compiler: /tmp/ccXgHa9s.o(.text+0x48): In function `main': : warning: the `gets' function is dangerous and should not be used. And here's where I used gets: #include "common.h" //common.h includes string.h .... .... int main(void) { char zf_name[50]; .... printf("Enter the name of the file\n"); gets(zf_name); ... return 0; } On May 19, 10:38=A0am, pereges <Brol...@gmail.com> wrote: > I'm getting a warning on my linux gcc compiler: > > /tmp/ccXgHa9s.o(.text+0x48): In function `main': > : warning: the `gets' function is dangerous and should not be used. > > And here's where I used gets: > > #include "common.h" =A0//common.h includes string.h > ... > ... > > int main(void) > { > =A0 =A0char zf_name[50]; > > =A0 =A0.... > =A0 =A0printf("Enter the name of the file\n"); > =A0 =A0gets(zf_name); > =A0 =A0... > =A0 =A0return 0; > > > > }- Hide quoted text - > > - Show quoted text - I think the message is rather explicit; gets() is dangerous, and shouldn't be used. Alternatively, use fgets() or perhaps, scanf() to get input -- include Hi On May 19, 11:38 am, pereges <Brol...@gmail.com> wrote: > : warning: the `gets' function is dangerous and should not be used. > char zf_name[50]; > gets(zf_name); How do you know the file name is le...

every java sp gets error:sql4301N java interpreter startup or com failed. reason 0
Windows 2000 udb v 7.2 Got the latest fixpak 13 Applied it. Still can't get a single java sp to run. I used to get reason "2"... now reason "0" - reason 0 is not even documented. I point jdk11_path to: Java Development Kit 1.1 installation path (JDK11_PATH) =3D g:\sqllib\java I used to point to a 1.4 jdk I had installed with the same errors. Tried simple routines.... last try was with samples provided. Followed instructions. java Spserver.java copy files to %DB2PATH\function registered/cataloged sp compiled client ran client... Just errors. ...

Trying to get code to compile and getting errors please help.
ERRORS: tony.c:122: `DUPLEXFULL' undeclared (first use in this function tony.c:126: `CTSCOND' undeclared (first use in this function) SOURCE: ioctl.data.comparameters.databits = DATABITS8; // was 7. ioctl.data.comparameters.parity = PARITYEVEN; ioctl.data.comparameters.flowctl = SOFTWAREFLOWCTL; ioctl.data.comparameters.baudrate = BAUD9600; ioctl.data.comparameters.stopbits = STOPBITS1; ioctl.data.comparameters.duplex = DUPLEXFULL; ioctl.data.comparameters.modemdelay = 0; >ERRORS: > >tony.c:122: `DUPLEXFULL' undeclared (first use in this f...

Roy Schestowitz The Liar Gets Pissy When His Posts Get Audited.
Roy Schestowitz the pathological liar doesn't like it when people point out that his subject lines often have nothing to do with the articles he provides links to. Here is an example of Roy Schestowitz the gym bunny getting pissy and actually admitting his subject line has nothing to do with the article. Unbelievable. And this fool considers himself an investigative journalist? He's more of a laughing stock. Read this thread, http://groups.google.com/group/comp.os.linux.advocacy/br owse_thread/thread/2bdb19118332e6e6/c31f075376b265b3? hl=en&lnk=raot#c31f075376b265b3 http://t...

Why do I get Error -41110 occurred at Excel Get Worksheet vi?
This app runs fine on one machine and gives the error on another. What might be the cause of this? Thanks, Fran Ankita, &nbsp; Many thanks. Your response got me thinking. The machine that the app was having a problem with had a copy of the worksheet where the sheet name was changed by the user making it incompatable with the sheet name called out in the app. &nbsp; Just wish that I knew where this "Error" is defined because I could not find it. &nbsp; Thanks Again, Fran ...

Web resources about - Getting error while getting Google plus posts - comp.lang.java.programmer

Obama planning historic trip to Cuba to cement warmer ties
President Barack Obama will pay an historic visit to Cuba in the coming weeks, senior Obama administration officials said Wednesday, becoming ...

Kylie Jenner Signs On With Puma Despite Kanye West Twitter Protest – Will Kim Kardashian Play Peacekeeper ...
Kylie Jenner is definitely making sure fans know that she is her own person. It didn’t take long after Kanye West declared on Twitter that there ...

Opening Statements Begin in Islamic State Trial in Phoenix
Prosecutors have opened their case against a man they say was the driving force behind an Islamic State-inspired plot to attack an anti-Islam ...

Remains of the Day: Twitter Gets GIF Search
Twitter is making it easier to add animated GIFs to your tweets, thus saving the company and establishing it as the only social network you need. ...

Samsung Galaxy J7 Hits The FCC
Whenever a particular device is close to a release, then you can be sure that it will make an appearance over at the FCC, although one should ...

Virtual Reality Therapy Could Be Used To Treat Depression
Could virtual reality be the next frontier for treating depression? A new study, published in the British Journal of Psychiatry Open on Monday, ...

You Can Now Access Gmail Features Without An @Gmail Address
It’s tough to get people to switch from one email service to another — getting a new email address might be even more annoying than having to ...

Aussie swim great Thorpe reveals mental health issues since a teen
Swimming great Ian Thorpe Thursday revealed he has battled mental health issues since his teenage years as he opened up about his struggle with ...

Nike drops Manny Pacquiao after 'gays worse than animals' comment
Manny Pacquiao's latest disparaging comments about gays have cost him a contract with Nike. It may not be the only endorsement Pacquiao loses, ...

Spotify is giving away free Chromecasts to new Premium subscribers
Looking for a good reason to sign up for a Spotify Premium account? How about a free Chromecast ? Spotify announced this week that new subscribers ...

Resources last updated: 2/18/2016 5:52:41 AM