How to get data from DebugHeaderInfo?

20 views
Skip to first unread message

ody...@gmail.com

unread,
Jul 14, 2021, 2:45:58 PM7/14/21
to RestFB

I'm trying to get data from the actual calls to FBs from RestFB in order to manage rate limitations, and I'm using DebugHeaderInfo. The problem is that it never contains any data.

I'm reading in the following logging.properties file before getting any facebook client:

handlers = java.util.logging.ConsoleHandler,java.util.logging.FileHandler
.level = ALL
java.util.logging.ConsoleHandler.level = FINE
java.util.logging.FileHandler.level = ALL
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
com.restfb.level = FINE
com.restfb.HTTP.level = DEBUG

And in during the main code I call:

DebugHeaderInfo headerInfos = this.facebookWebReq.getDebugHeaderInfo();
if (headerInfos == null) return -1;
if (headerInfos.getAppUsage()!= null)
    return headerInfos.getAppUsage().getCallCount();
else if (headerInfos.getPageUsage() != null)
   return headerInfos.getPageUsage().getCallCount();

Either headerInfos is null, or the calls getAppUsage() and getPageUsage() are always null.

Can anyone point out what I am doing wrong?
Thanks!
Reinaldo

Reply all
Reply to author
Forward
0 new messages