本文整理汇总了Java中com.parse.ParseTwitterUtils.initialize方法的典型用法代码示例。如果您正苦于以下问题:Java ParseTwitterUtils.initialize方法的具体用法?Java ParseTwitterUtils.initialize怎么用?Java ParseTwitterUtils.initialize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.parse.ParseTwitterUtils
的用法示例。
在下文中一共展示了ParseTwitterUtils.initialize方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreate
import com.parse.ParseTwitterUtils; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
Fresco.initialize(this);
Parse.enableLocalDatastore(this);
Parse.initialize(this, "Qkf0ETa2dogBX3ot1BgSswy09PR6fAK6vJEMGcof", "KqV8lTovHNQQPuZ819qzCHK617uXvJIkWpxaqLkf");
ParseUser.enableAutomaticUser();
ParseACL defaultACL = new ParseACL();
ParseFacebookUtils.initialize(this);
ParseTwitterUtils.initialize("J3ncUDAVwYhOPRadv1kD7Z75G","bVSeScEZB8u7jFnLQmtk0FiCTdw1vIJJpfapTDrHDoVFLEOFCP");
}
示例2: onCreate
import com.parse.ParseTwitterUtils; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
// Parse.enableLocalDatastore(this);
Parse.initialize(this, "9nhyJ0OEkfqmGygl44OAYfdFdnapE27d9yj9UI5x", "7pJlc2KZgpFXZHwvoXwVeZUsEtiDoTrtjPM7EGBa");
ParseUser.enableAutomaticUser();
ParseACL defaultACL = new ParseACL();
ParseFacebookUtils.initialize(this);
ParseTwitterUtils.initialize("FfUOeQ5OBuv0qOkdHbfXCrwdk", "xQmFnUSii54eS3iUrl0uIrxfeL4EfIdFc6iyoHUDgSIVGDbauD");
Fresco.initialize(this);
}
示例3: onCreate
import com.parse.ParseTwitterUtils; //导入方法依赖的package包/类
@Override
public void onCreate() {
SharedPreferences sPref = getSharedPreferences("location", MODE_PRIVATE);
currentLatitude = Double.valueOf(sPref.getString("lastLatitude", "28.6328"));
currentLongitude = Double.valueOf(sPref.getString("lastLongitude", "77.2197"));
Parse.initialize(this, "tA24P8ZHIuY6T6GCePmlwS94r7DKYIl0DrYee41g", "1pJVaZcK43AXO6wAtDzqPs1GMkA1E3jHtXTNCzKc");
ParseFacebookUtils.initialize(this);
ParseTwitterUtils.initialize("PdLB1zaNjktVXpBqPddVMWENt", "ND4JkQj7lucz1uQO0URF3mBfQFORIzSKY2oHUPZGtJgbaDzZLY");
buildGoogleApiClient();
super.onCreate();
}
示例4: loginTwitter
import com.parse.ParseTwitterUtils; //导入方法依赖的package包/类
public void loginTwitter(View view) {
showActivityIndicator();
// network not available
if (!Utils.isNetworkAvailable(getApplicationContext())) {
Toast.makeText(getApplicationContext(), "Network not available", Toast.LENGTH_SHORT).show();
hideActivityIndicator();
return;
}
ParseTwitterUtils.initialize(ParseConsts.TWITTER_CONSUMER_KEY, ParseConsts.TWITTER_CONSUMER_SECRET);
ParseTwitterUtils.logIn(this, new LogInCallback() {
@Override
public void done(ParseUser user, ParseException ex) {
hideActivityIndicator();
if (user == null) {
String errMsg ;
if (ex == null){
errMsg = "Sorry, but looks like you cancelled the Twitter login";
}else {
errMsg = "Unable to login using Twitter " + ex.getMessage();
}
Toast.makeText(getApplicationContext(), errMsg, Toast.LENGTH_SHORT).show();
} else {
Utils.setCurrentUsername(user.getUsername());
saveInstallationID();
showHome();
}
}
});
}