2015年10月1日 星期四

設定Facebook

repositories {
    mavenCentral() 
}

dependencies { 
  compile 'com.facebook.android:facebook-android-sdk:4.6.0'
}

// Add this to the header of your file:
import com.facebook.FacebookSdk;

// Updated your class body:
@Override
 public void onCreate(Bundle savedInstanceState) {
     super.onCreate(savedInstanceState);
     FacebookSdk.sdkInitialize(getApplicationContext());
     // Initialize the SDK before executing any other operations,
     // especially, if you're using Facebook UI elements.
}




    ...
    
    ...








沒有留言:

張貼留言