Example usage for twitter4j AsyncTwitter destroyFavorite

List of usage examples for twitter4j AsyncTwitter destroyFavorite

Introduction

In this page you can find the example usage for twitter4j AsyncTwitter destroyFavorite.

Prototype

void destroyFavorite(long id);

Source Link

Document

Favorites the status specified in the ID parameter as the authenticating user.

Usage

From source file:com.marpies.ane.twitter.functions.UndoLikeStatusFunction.java

License:Apache License

@Override
public FREObject call(FREContext context, FREObject[] args) {
    super.call(context, args);

    long statusID = Long.valueOf(FREObjectUtils.getString(args[0]));
    mCallbackID = FREObjectUtils.getInt(args[1]);

    AsyncTwitter twitter = TwitterAPI.getAsyncInstance(TwitterAPI.getAccessToken());
    twitter.addListener(this);
    twitter.destroyFavorite(statusID);

    return null;//from ww  w .j a va  2 s .  c o  m
}