title: Android - Facebook Graph API - not able to get AccessToken
body: <p>So I'm trying to fetch Data from a Facebook page and in the Graph Explorer I'm doing just fine. I am using a global app Token.</p>
  
  <p><a href="https://i.stack.imgur.com/kFHTl.png" rel="nofollow"><img src="https://i.stack.imgur.com/kFHTl.png" alt="enter image description here"></a></p>
  
  <p>I am able to fetch data here. So now I'm trying to do following:</p>
  
  <pre><code>    GraphRequest request = GraphRequest.newGraphPathRequest(
              accessToken,
              "/&lt;-pageid-&gt;/posts",
              new GraphRequest.Callback() {
                  @Override
                  public void onCompleted(GraphResponse response) {
                      // Insert your code here
                  }
              });
  
      request.executeAsync();
  }
  </code></pre>
  
  <p>But i just don't know how to create the Access Token as java Object.  </p>
  
  <pre><code>    AccessToken.getCurrentAccessToken();
  </code></pre>
  
  <p>is returning null in my case. I called following code in the beginning:</p>
  
  <pre><code>FacebookSdk.sdkInitialize(getApplicationContext());
  AppEventsLogger.activateApp(this);
  </code></pre>
  
  <p>And did everything in the API Quickstart guide.</p>
  
  <p>I tried to initialize a new Object of AccessToken, but I'm missing so many parameters and filling null didn't work out well. I just have an AppToken as String fetched as json from the graph api and a UserToken. How to achieve getting the AccessToken?</p>