Re-tweets and replies with JTwitter - android

I have not used Twitter enough to become familiar with its terminology or the way it works, so please help me in understanding the problem I have at hand.
I am getting last 20 status updates posted by some Twitter user via RSS feed, the feed XML is parsed and the statuses are displayed in a ListView. Which means that I have the original tweet in a String variable(row of ListView). When I click a ListView item, I get the option of "Re-tweeting" and "post reply".
As, I understand it, when re-tweeting I will have to just update my status as:
RT #orig-poster <original tweet>
and when posting a reply I will have to just update my status as:
#orig-poster <my tweet>
I skimmed through the JavaDocs of the Jwitter library(Twitter class) and found a setStatus(String) method. I dont think I will have to make use of retweet() or reply() functions of the Twitter class in JTwitter library.
Is my understanding correct? Please correct me if I am wrong here or missing anything.
Thanks!

Retweets and Replies are a bit more complex than simple syntax differences:
A reply has an in_reply_to_status_id field that indicates what Tweet (given by Tweet id) the submitted tweet is replying to (see http://apiwiki.twitter.com/Twitter-REST-API-Method:-statuses%C2%A0update).
A retweet has two forms:
An 'old style' retweet which prepends an RT to an original tweet
A new sytle retweet, which calls a specific API endpoint with a Tweet id (see http://apiwiki.twitter.com/Twitter-REST-API-Method:-statuses-retweet).

You're quite right that you can send retweets and replies just by setting your status.
If you can, use Twitter.reply() for replies, as this provides threading information to Twitter, which other clients may use to give conversational displays.
If you want new-style retweets use Twitter.retweet(). New-style v old-style is a matter of taste. New-style retweets will display as the original tweeter in the Twitter web client, and may be ignored by other clients as they're not included in the standard timeline for a user. Personally I prefer old-style, which is more reliable and allows you to add your own comment.

As others pointed out there are difference how the data is presented on Twitter. You have to use retweet() or reply() so get the full out of the API.

The terminology is correct (that's how Twitter users retweet/update their statuses) but I'm not sure about the library.
Replies and retweets can be linked back to the original tweet, so I assume this is why the API has a reply() and retweet() methods and that's why you should use those two functions.
Edit: By "linking back", I mean that, on twitter, if a tweet has been retweeted, it tells you who originally tweeted it. If a tweet has been replied to, you can view the tweet of which it is a reply.

Related

post a message to facebook wall from android studio project

I am trying to post some predefined text to facebook wall using my android app.
I read somewhere in facebook terms and conditions that fb does not allow external apps to post predefined text to fb wall.
Is there any way to add text to the fb post edit box?
If so pls tell how to do it.
Thanks in advance :)
post some predefined text
That part is impossible and not allowed, because:
Don't prefill captions, comments, messages, or the user message
parameter of posts with content a person didn’t create, even if the
person can edit or remove the content before sharing.
Source: https://developers.facebook.com/policy/
Obviously, you will never get the required permission (publish_actions) approved for posting predefined text.

Post via Facebook android API indicates success, but cannot find it on Facebook site

One of the user's of my app, which allows for posting messages to their facebook wall, says that even though it is indicating success, he cannot find the message anywhere.
I've asked him to make sure the app is on his list of approved apps...and it is.
I've asked him to check his personal wall, since it seems you often do not see the app posting on your news feed, but you should always be able to see it on your wall. He says it is not there either.
I retrieved the response from the request(), and it is of the form "id":"22346356_456354....". I assume that's some kind of transaction ID, and is supposed to indicate success?? (I have no idea, because I CANNOT find anywhere a list of what the API responses might be).
Is that the code for "success", and if so, is there some way I can track down with that code just where his post actually went?
thanks.
The response you got back is indeed a success response, and it is the id of the new post (as mentioned in the documentation), which is made of the USER-ID_POST-ID.
As for how to view that post, just direct your browser to:
http://www.facebook.com/USER-ID/posts/POST-ID

how do i like a message/notification with the linkedin api?

I have an application that authenticates users through the LinkedIn API. My questions:
is it possible for an application to like messages to all users who authorized it?
is it possible to get like list of a message to a subset of the application users?
I've been looking for a while, and can't find anything.
Via the Groups API of the LinkedIn APIs, you can like a post in a particular group using the following JavaScript code (XXXX is the particular post id):
IN.API.Raw('/posts/XXXX/relation-to-viewer/is-liked')
.method('PUT')
.body("true")
.result(function(result) {
alert(JSON.stringify(result));
})
.error(function(result) {
alert(JSON.stringify(result));
});
However, keep in mind that likes should not be automated but user initiated - only users who have authenticated your app should be liking posts, and only when they manually choose to do so. Writing a script that automatically likes all posts from any user that posts a message from your app is against the LinkedIn API terms of service.
Can't confirm for sure but maybe this link about likes can help u and give a clues about possible options.. Reported example you can find here or here. However I have no guaranty that this works cause I am not author of those posts.. Maybe u will find better and more accurate answer at LinkedIn API forum..
Hope it helped a bit.. Cheers

Android - facebook automatically post

I want to integrate an android app with facebook.
I've managed to fetch friends list and to post on wall on demand (a facebook url view is loaded and the user can post on wall whatever he texts).
I want, when the app is started and the user accepts the permisions, to post a message on wall that he is started to play my game without showing that url view for posting (an automatically post)
Can someone help me?
It's probably late and maybe you've got your answer for this question.
But for anyone else who need an answer:
First, you can use the Graph API, there is an example of how to post on
a wall.
But there is a restriction!!
Facebook is not allow us to enter a prefiil message!
The content of this message must come from the user itself!
Watch this video of Facebook on Platform Policy 2.3 Example and Explanation

By Using Facebook Graph API, How to read Facebook wall?

I am using the facebook API in my app, i know how to post message on wall. my requirement is, i want read the wall information of user recent status information through code .
How can i achieve this...
for example. from my facebook account i want to get the latest status information.
Here's a great example of using the GraphAPI to do that
https://graph.facebook.com/me/feed?access_token={}
Try it out here: https://developers.facebook.com/tools/explorer
EDIT
I stumbled across this the other day. There's a connection from the user object called statuses, which filters the stream even more than feed. As with many graph calls, you can add ?limit=N to limit the result set. So this new way I discovered would look like:
https://graph.facebook.com/me/statuses?limit=1&access_token={}
You should use a third party API such as Easy Facebook SDK. It allows you to do what you are trying to do with ease.
U should check it out here:
http://developers.facebook.com/blog/post/385/

Categories

Resources