我需要扩展我的facebook访问令牌,我称之为:
https://graph.facebook.com/oauth/access_token?
client_id={MY PAGE ID}&
client_secret={THE SECRET KEY OF MY APP}&
grant_type=fb_exchange_token&
fb_exchange_token={AN ACCESS TOKEN FOR MY PAGE}
Run Code Online (Sandbox Code Playgroud)
我收到这个错误:
"error": {
"message": "Error validating application. Cannot get application info due to a system error.",
"type": "OAuthException",
"code": 101
}
Run Code Online (Sandbox Code Playgroud)
我已经看到了access_token的很多问题,但没有相对于页面的答案,idk为什么facebook使用api为什么......但是方式......
谢谢,
我在这里遇到了很大的错误.我正在尝试使用supportInvalidateOptionsMenu()更改操作栏菜单; 但是当执行该函数时,应用程序关闭,没有错误.
奇怪的是,一切都在我的Galaxy Nexus(4.2.2)上正常工作,但不能在我朋友的手机(android 4.0.3)中工作,也不适用于我的Android 2.1模拟器
这是我的代码:
protected void onCreate(Bundle savedInstanceState) {
...
actionbar = getSupportActionBar();
...
myWebView = (WebView) findViewById(R.id.webview);
myWebView.getSettings().setJavaScriptEnabled(true);
myWebView.addJavascriptInterface(new WebAppInterface(this), "Android");
myWebView.loadUrl(getString(R.string.site_load));
...
}
public class WebAppInterface {
SherlockActivity mActivity;
WebAppInterface(SherlockActivity c) {mActivity = c;}
public void setrefreshon() {showRefresh = true; mActivity.supportInvalidateOptionsMenu();}
}
Run Code Online (Sandbox Code Playgroud)
有人能帮我吗?:/
我正在尝试自定义我的sherlock操作栏,但我在style.xml中编码的任何内容都无法识别.
在我的清单文件中:
android:theme="@style/Theme.Sherlock"
Run Code Online (Sandbox Code Playgroud)
我的style.xml:
<resources>
<style name="Theme.MyAppTheme" parent="Theme.Sherlock">
<item name="android:actionBarStyle">@style/Theme.MyAppTheme.ActionBar</item>
</style>
<style name="Theme.MyAppTheme.ActionBar" parent="Widget.Sherlock.ActionBar">
<item name="android:background">#222222</item>
<item name="android:height">64dip</item>
<item name="android:titleTextStyle">@style/Theme.MyAppTheme.ActionBar.TitleTextStyle</item>
</style>
<style name="Theme.MyAppTheme.ActionBar.TitleTextStyle" parent="TextAppearance.Sherlock.Widget.ActionBar.Title">
<item name="android:textColor">#fff</item>
<item name="android:textStyle">bold</item>
<item name="android:textSize">32sp</item>
</style>
Run Code Online (Sandbox Code Playgroud)
我用这种方式调用我的操作栏:
public class MainActivity extends SherlockActivity {
com.actionbarsherlock.app.ActionBar actionbar;
...
actionbar = getSupportActionBar();
... }
Run Code Online (Sandbox Code Playgroud)
显示操作栏没有问题,但同样没有显示在style.xml中编码的任何自定义,有人可以帮助我吗?感恩.