google+ google-api-java-client: getting person information about view count - java

I'm discovering the google-api-java-client (google+) for java and for me it isn't clear how to get the total view count for any g+ profile.
In detail, I can get those properties outa Person model:
...
Person.getAboutMe()
Person.getPlusOneCount()
Person.getCircledByCount()
...
and lot's more but none with
getViewCount()
or something. Does anybody have a clue?
circlecount.com is also able to get information about the view count, but how?
Thanks for any help.
Cheers.

This information isn't currently exposed in the API, there is an open feature request for it here:
https://code.google.com/p/google-plus-platform/issues/detail?id=798
Circlecount uses page scraping to get some of the information that isn't available via the APIs.

There is currently no way to see the View count of someones Google+ profile though the API. A feature request has been made feel free to add your name to it. "views" in people.get response the more people that request it the better the chance we will have of them adding it.

Related

Integrate Liblinphone 4 in android project

I am looking to develop a voice communication application, I set up an asterisk server and I want to integrate a sip client in my android application. After intensive research on the net, I found no documentation to integrate liblinphone 4 in an android project. Does anyone have an idea? Currently I have integrated this code trying to understand a little example in C of an old version of liblinphone:
(But i have this error : Linphone: Contact has not been fixed, stack will do, i think that if i can fixed contact, I could make registration)
Core core = Factory.instance().createCore(null, null, this);
ProxyConfig proxyConfig = core.createProxyConfig();
Factory.instance().setDebugMode(true, "Linphone");
AuthInfo authInfos;
Address from = Factory.instance().createAddress("sip:112#**.*.*.*");
proxyConfig.setIdentityAddress(from);
proxyConfig.setServerAddr(from.getDomain());
proxyConfig.enableRegister(true);
proxyConfig.setRealm("**.*.*.*");
proxyConfig.setContactParameters("**.*.*.*");
proxyConfig.done();
Address to = Factory.instance().createAddress("sip:105#*.*.*.*");
authInfos = Factory.instance().createAuthInfo(from.getUsername(), null, "*****", null, null, null);
// You must provide the Android app context as createCore last param !
authInfos.setDomain("**.*.*.*");
authInfos.setUsername("112");
authInfos.setPassword("*****");
authInfos.setUserid("112");
core.addAuthInfo(authInfos);
core.setPrimaryContact("sip:112#**.*.*.*");
core.addProxyConfig(proxyConfig);
core.start();
core.inviteAddress(to);
System.out.println("initialization is ok???");
Finally, I followed another track. Doubango, the examples concerning imsdroid. It was necessary to solve problems of dependence but I reassure you that it is better than all the lost time to look for simple bookstores. At the time when I answer my post, I was able to make a call on my server, I will test the other features shortly. But already, the actual joy that I have .... I was starting to be desperate with all the paid bookstores on the market and the lack of liblinphone documentation. Thank you Doubango, if I have enough time, I will write a tutorial on it. Here is the github repository: https://github.com/DoubangoTelecom

twitter API identify users with direct messaging enabled

I'm trying to use twitter4j (in Java) to grab the list of users following a particular user who happen to have direct messaging enabled. Something like this...
IDs followerIDs = twitter.getFollowersIDs(someTwitterScreenName, -1);
long[] ids = followerIDs.getIDs();
for (long id : ids) {
twitter4j.User user = twitter.showUser(id);
String userScreenName = user.getScreenName();
String realName = user.getName();
//I'm hoping for something like...
///Boolean directMessagingEnabled = user.messagingEnabled();
}
The only problem is that I can't find any attributes associated with the twitter4j.User object that sound suitable (and also can't find any reference to it in the API documentation). Does anyone know if there's some way to programmatically find these types of users? Or perhaps twitter have deliberately excluded it? Thanks for any thoughts at all.
------EDIT-----
The documentation link from Yuri led me to this response from a twitter employee: "Determining if a user accepts DMs from all is not available via the public API. If you are a trusted partner please reach out via your direct Twitter contacts for details."
(https://twittercommunity.com/t/how-can-i-tell-which-users-the-current-user-can-send-messages-to/36127/4)
Also noticed that it IS possible to get the DM status for an already authenticated user using "AccountSettings.getAccountSettings().allow_dms_from"
This is discussed here
https://dev.twitter.com/rest/reference/post/direct_messages/new
There is apparently a whitelist for access you can apply for.
However it seems you mostly have all you need. The users following your account can usually receive DMs from you already. This doesn't cover the cases where the user either DMed you first, or accepts DMs from anyone.
But it is probably simplest to try sending and inspect the failures.

Java Web Start return value - workaround

I know that returning a value from a JWSapp to the "calling" page cannot be done.
However, I use this JWSapp to get user ID from its biometric information.
The idea is that when you try to login, a button allows to launch the JWSapp that will deal with the biometric tasks and then return the user's idea.
Still, as I said, from a JWSapp I cannot send back the id to auto-complete the field. I found this post: Returning a value from a java web start application but I really need to keep the JWS (external constraints)...
So there's my question: is there any workaround to get the id back?
Thank you in advance :)

Unexpected error when publishing photo to page

I'm trying to publish a photo to a page using the following:
FacebookClient client = new DefaultFacebookClient(destinationAccessToken);
BinaryAttachment attachment = BinaryAttachment.with(imageName, imageInputStream);
Photo photoResponse = client.publish("/me/photos", Photo.class, attachment);
I'm getting the following response:
{
"error": {
"message":"An unexpected error has occurred. Please retry your request later.",
"type":"OAuthException",
"code":2
}
}
When I use the same code to publish to a user wall it works fine.
I've also tried posting to "/{page id}/photos" with the same result.
The destination access token has the manage_pages, photo_upload, publish_actions, and publish_stream permissions amongst others.
What am I doing wrong here?
UPDATE:
If I publish to a predetermined album using "/{album id}/photos" then it works. Quoting this Facebook developer blog post:
https://graph.facebook.com/USER_ID/photos - The photo will be
published to an album created for your app. We automatically create an
album for your app if it does not already exist. All photos uploaded
this way will then be added to this same album.
So is this behavior broken for pages? Or am I misunderstanding something here?
UPDATE 2:
I found a bug report for this issue, so I'm posting that as an answer.
UPDATE 3:
The bug seems to have been resolved.
I found the Facebook bug report corresponding to this behavior:
http://developers.facebook.com/bugs/355536551171535
So it would seem I'm not doing anything wrong. I guess the temporary workaround would be to check for a predetermined album and create it if necessary, then publish to it. (Note that the user_photos permission is not needed for this workaround, since albums/photos on pages are always public).

How do I maintain session state with a Google Earth client?

I'm playing with dynamic updates to Google Earth KML files.
The updates are of the form
<kml...>
<NetworkLinkControl>
<Update>
<targetHref="...">
<Change>
<Placemark targetId="...">
...stuff to update...
</Placemark>
</Change>
</Update>
</NetworkLinkControl>
</kml>
And it all works greatm from my Java Servlet - except that GE doesn't seem to support HTTP Sessions, and I need to provide only the updates that have occurred since the last request from a given client.
Am I doing something wrong? Does GE support sessions and I'm too stupid to work out how? If I need to provide client-specific updates without sessions, how can I do that? (I know I could use the source IP address as a coarse measure but that feels kinda nasty...)
Thanks!
Old question, but you need to encode the session ID as part of the URLs. GE does not maintain cookies.
It seems that I can use the kml/NetworkLinkControl/cookie element to give the client a parameter to send back to me. Trying to use this to get the client to tell me when it last requested an update and use this instead of sessions...

Categories

Resources