Search in sources :

Example 1 with FacebookHandle

use of com.androidquery.auth.FacebookHandle in project androidquery by androidquery.

the class AjaxAuthActivity method auth_unauth.

public void auth_unauth() {
    FacebookHandle fh = new FacebookHandle(this, APP_ID, "read_stream");
    fh.unauth();
    TwitterHandle th = new TwitterHandle(this, CONSUMER_KEY, CONSUMER_SECRET);
    th.unauth();
    showResult("Auth data cleared", null);
}
Also used : TwitterHandle(com.androidquery.auth.TwitterHandle) FacebookHandle(com.androidquery.auth.FacebookHandle)

Example 2 with FacebookHandle

use of com.androidquery.auth.FacebookHandle in project androidquery by androidquery.

the class AjaxAuthActivity method auth_facebook_sso.

public void auth_facebook_sso() {
    handle = new FacebookHandle(this, APP_ID, PERMISSIONS);
    handle.sso(ACTIVITY_SSO);
    String url = "https://graph.facebook.com/me/feed";
    aq.auth(handle).progress(R.id.progress).ajax(url, JSONObject.class, this, "facebookCb");
}
Also used : FacebookHandle(com.androidquery.auth.FacebookHandle)

Example 3 with FacebookHandle

use of com.androidquery.auth.FacebookHandle in project androidquery by androidquery.

the class AjaxAuthActivity method auth_facebook.

public void auth_facebook() {
    FacebookHandle handle = new FacebookHandle(this, APP_ID, PERMISSIONS) {

        @Override
        public boolean expired(AbstractAjaxCallback<?, ?> cb, AjaxStatus status) {
            //custom check if re-authentication is required
            if (status.getCode() == 401) {
                return true;
            }
            return super.expired(cb, status);
        }
    };
    String url = "https://graph.facebook.com/me/feed";
    aq.auth(handle).progress(R.id.progress).ajax(url, JSONObject.class, this, "facebookCb");
}
Also used : FacebookHandle(com.androidquery.auth.FacebookHandle) AbstractAjaxCallback(com.androidquery.callback.AbstractAjaxCallback) AjaxStatus(com.androidquery.callback.AjaxStatus)

Example 4 with FacebookHandle

use of com.androidquery.auth.FacebookHandle in project simplefacebook by androidquery.

the class AdhocActivity method initView.

private void initView() {
    //12-15 18:57:48.805: W/AQuery(15543): get:https://graph.facebook.com/107065679322731_325851500777480?locale=en_US&access_token=BAAEUiDdRZCLIBALBHKB7lV6WBa4WBeT2QpCn6zvqXjnTVv2Qh8Fwgbb0KOFsggp7dYbwFZAjQDKxZArcEp0KP0uZAdxH9PUmnO0MleRxmz0Se9FXDqEzQn6olKlDwKcZD
    FacebookHandle handle = AppUtility.makeHandle(this);
    String url = "https://graph.facebook.com/107065679322731_325851500777480";
    aq.auth(handle).ajax(url, JSONObject.class, this, "jsonCb");
}
Also used : FacebookHandle(com.androidquery.auth.FacebookHandle)

Example 5 with FacebookHandle

use of com.androidquery.auth.FacebookHandle in project simplefacebook by androidquery.

the class AppUtility method makeHandle.

public static FacebookHandle makeHandle(Activity act) {
    FacebookHandle handle = new FacebookHandle(act, APP_ID, PERMISSIONS);
    handle.message(act.getString(R.string.connecting_facebook));
    return handle;
}
Also used : FacebookHandle(com.androidquery.auth.FacebookHandle)

Aggregations

FacebookHandle (com.androidquery.auth.FacebookHandle)5 TwitterHandle (com.androidquery.auth.TwitterHandle)1 AbstractAjaxCallback (com.androidquery.callback.AbstractAjaxCallback)1 AjaxStatus (com.androidquery.callback.AjaxStatus)1