display facebook wall in android sdk
I've been working with the facebook-android-sdk and integrated posting a message to the user's wall. I've got the posting working, however I want to display the user's wall with the new post so they can view it.
Does the sdk implement this functionality through Dialogs somewhow or do I need to load the Graph API URL through a webview in Android? (going off the info here http://developers.facebook.com/docs/reference/dialogs/
For displaying the stream (aka wall/feed/posts)
overall information: see: https://github.com/facebook/facebook-android-sdk/tree/master/examples/stream
Java code here for how to render: https://github.com/facebook/facebook-android-sdk/blob/master/examples/stream/src/com/facebook/stream/StreamRenderer.java
After a lot of digging around, I just went ahead and used a Webview.
...
public void onComplete (Bundle values)
{
Log.d (TAG, "onComplete()");
Toast.makeText (getBaseContext (), "Completed", Toast.LENGTH_SHORT).show();
SharedPreferences.Editor editor = mPrefs.edit();
editor.putString("access_token", facebook.getAccessToken());
editor.putLong("access_expires", facebook.getAccessExpires());
editor.commit();
// post the message
postMessageOnWall ("");
// we're already authenticated so just go to the user's wall in a webview
WebView mWebView;
mWebView = (WebView) findViewById(R.id.wv_fb);
mWebView.getSettings().setJavaScriptEnabled(true);
mWebView.loadUrl("http://www.facebook.com/profile.php?&sk=wall");
}
...
链接地址: http://www.djcxy.com/p/49610.html