i'm sorry to repost this question, but the other one was put on hold for no reason and i have an app out there that doesn't work because of this problem, and i need a fix as soon as possible.
THIS IS THE ONLY INFO ECLIPSE AND THE APP ITSELF GIVES TO ME:
i've developed an app for android that uses fb to share a link, when i share a post with MY fb account everything goes fine, except that no one sees that post! but when i do with my gf's it doesn't even post it and gives me back a toast saying that error and logcat is this:
04-18 15:57:57.650: E/Activity(16658): Error: com.facebook.FacebookException: Error publishing message
there, i do this:
FacebookDialog shareDialog = new FacebookDialog.ShareDialogBuilder(Favorites.this)
.setDescription("xxxxxxxxxxxxxx")
.setApplicationName("xxx")
.setName("xxx")
.setPicture(imagesURL+filenames.get(location))
.setLink("http://xxxxxxxxxx"+filenames.get(location))
.build();
uiHelper.trackPendingDialogCall(shareDialog.present());
The only possible reason seems to me is that, your application is still in the development mode. If so, besides you and other administrators/testers/developers; no one can see the post and also can't publish a post via your app.
To change the mode of your app to live in the app settings-
Related
I am using Javacord to write my small admin plugin for my friends' server. Everything was going fine, until I realized I could not get the members of the Server. I was only getting my bot as the only member. Then I searched a little about it, and turns out I needed to turn these intents on. So as you can see on the image, the intents are enabled.
Still, after this, my script only returns my bot as the only member.
What am I doing wrong?
Here's the code for getting the members:
Also, the weird thing is that I seem to not have the intents, even after enabling them. This is the list I get on api.getIntents():
I was having the same issue as you even after enabling the intents in the Discord Developer Portal.
It turns out that you need to enable the intents in the DiscordApiBuilder:
DiscordApi api = new DiscordApiBuilder()
.setToken("your token here")
.setAllIntents() // You can change this depending on which intents you require
.login()
.join();
For more info see this wiki link
I used to create accounts and connect to my application with firebase but then soon when I disconnected I couldn't create accounts. After 1h of that, I managed to create an account and when I disconnected to see if the problem was resolved, I realize that it's still there.
By doing task.getException() in case of account creation failure, I get this error:
"com.google.firebase.FirebaseException: An internal error has occurred. [7:]"
Do you have an idea of the cause of the problem?
I have same problem because my internet was not active.
Make sure you have active internet connection.
If you are sure you have an active Internet connection and you are testing from an Emulator, restart your emulator and it should work. Sometimes, the emulator disconnects from the Internet and these sort of problems occur.
I had a similar issue and got the same exception and code: 7. I was calling firebaseUser.getIdToken() in a Rx stream. So while testing the apps functionality while being offline, I found that the JWT token that is returned in firebaseUser.getIdToken() had expired and was throwing said error. It has a lifetime of 1h.
So I split out my implementation to separate functions, only calling firebaseUser.getIdToken() before a authorised call, which must be done while online anyway to be sure and secure.
Without seeing any code, it seems you are signed in/keep a reference to a expired firebase token. Make sure you signed out properly from firebaseAuth before calling your "account creation" piece.
Here is how I solved the same issue: Opened a browser on my emulator, typed something and searched. After that, I came back to my app and retried to connect to firebase and everything started to work well.
The reason of the issue was probably the emulator not being able to connect to internet until I searched something in Google.
I have the same issue too.
My application crashed on offline mode/airplane mode.
getIdToken returns the current token if it has not expired. Otherwise, this will refresh the token and return a new one, more info here
In my case, I called the getIdToken like this getIdToken(true) which means I force refresh regardless of token expiration.
In my case call, getIdToken(false) like this solves the issue.
I have tested the offline mode/airplane mode and it works great.
Recently Facebook started to review our App, which followed in a restriction because our app was violating the Platform Policies. Both our Android and iOS app had a bug. We already fixed that bug, but didn't push the update to the Play Store and the App Store. After Facebook notified us about the restriction we pushed the update into production and requested a new appeal. However, the appeal was declined because of the Android app which still had a bug.
I couldn't find a bug and because the app was restricted we couldn't really test it. If we'd login using Facebook, we got an error message from Facebook telling us that our app was restricted:
To debug the Facebook login process I created a new Facebook app and copied all settings from the restricted FB App to the new 'debug' App. After changing the API keys and doing some testing everything seemed to work perfectly fine, even when setting the app status to production in the FB App settings.
So we knew that FB was sending the Android app some error code. I created a small update where the App will shows a part from the message sent by FB. We created a new appeal. Unfortunately, the app appeal got decline again. This time the send us a print screen with the error message:
Not that much information, however, this is an error message returned from the Android FB SDK. I tried to search the error message on Google and the Facebook Docs. The only thing that I found was this Stack Overflow post. It has to do with test users, but our app is in production, so we should have to add test users in production.
I'm clueless about what to do or try. I tried to email FB, they replied and basically said that I should try and ask a question on Stack Overflow. Which obviously is what I'm doing right now. Has anyone every experience such problems or how would I test this in production?
Edit
The code where the error is caught. The LoginManager is from com.facebook.login.LoginManager
loginActivity = myActivityParent as LoginActivity
facebookCallbackManager = CallbackManager.Factory.create()
LoginManager.getInstance().registerCallback(facebookCallbackManager, object : FacebookCallback<LoginResult> {
override fun onSuccess(result: LoginResult?) {
Log.d("FACEBOOK", "Successful login.")
loginPresenter!!.onSuccessfulFacebookLogin(result)
}
override fun onCancel() {
Log.d("FACEBOOK", "Facebook login was cancelled!")
enableViews()
}
override fun onError(error: FacebookException?) {
val errorMessage = error!!.message.toString()
displayErrorBoxTimed(errorMessage, myActivityParent, length = 5000)
Log.d("FACEBOOK", "Something went wrong while logging in with facebook!")
enableViews()
}
})
I am having difficulty getting Cognito registration and login to work for my app in Android Studio using this sample. When I attempt to log in via the simulator, the app works for a few seconds, then displays an error message: "Unable to execute HTTP request: Unable to resolve host 'cognito-idp.us-east-1.amazonaws.com': No address associated with hostname". This same error is the only error that appears in the console. I have seen similar questions and tried solutions such as checking to ensure my app has the permissions android.permission.INTERNET and android.permission.ACCESS_NETWORK_STATE, but the error persists. It also doesn't seem to be a network issue. I have updated to the latest version of the Android SDK as well as the AWS SDK, and the problem persists.
I currently I have a Cognito user pool set up which works properly for login on the iOS version of my app. Following the instructions in the readme for the sample code, I added an app to my existing user pool, and then copied and pasted the newly generated app client ID and app client secret into AppHelper.java for clientId and clientSecret respectively. I also set userPoolId to the ID listed for my user pool under "pool details" in the Cognito conosle, and cognitoRegion to US East, since this is the region of my user pool. I noticed that there was no need for me to set the pool name, as there was in the iOS version, so I'm wondering if that's something I need to do.
Sorry if this counts as a duplicate, but I wanted to post a question with the exact error message I encountered and the steps I took, and I'm wondering if someone has managed to get this specific sample working and what I should do.
The problem has been resolved, but unfortunately I'm not quite sure what fixed it since I didn't change anything in the code. All I did was install an update, so anyone with a similar problem should probably ensure that all SDKs used in the sample are properly updated, along with the simulator. It's also worth noting that I was using a different network than in my previous tests, so it's possible that it was a network issue after all.
I had the same issue.
The issue occurred when I used a VPN with emulator to test my program. The reason was that the internet connection in the emulator was too slow when connecting through a VPN.
This could also happen if your internet connection is not strong enough.
The solution is, use a real android device to test your code, if your internet connection is not good enough.
More info: https://github.com/aws-amplify/aws-sdk-android/issues/567
I am working on Google cloud messaging service in my android app. For this I need to register my android app to GCM server.
The gcm registration is failing.
I have checked:
The gcm register code is Async call.
The sender id (project id) is correct.
The manifest file is as per the google doc. http://developer.android.com/google/gcm/client.html
My device has google account set up.
I have tried both the cases - add google-play-services jar and import it as project.
I even went on to specify the version number (com.google.android.gms.version) in manifest as per this http://developer.android.com/google/play-services/setup.html#Setup
Where and why would this be failing?
When I catch the exception, exception cause is NULL.
I had done a demo app for this GCM part and it was working fine. I had used Eclipse with JellyBean SDK.
I extended this project to make the current app - package stucture remains same. But now am on Kitkat SDK.
I used the same Sender Id as before to register with GCM. It failed giving null id. I created new project at cloud console and used its project number as sender id. Still same error. Registration Id is null. I don't think Sender Id should be any issue.
Any help would be appreciated.
So is GCMRegistrar Class giving out, that it failed to register?
i think it could be your Manifest file - check everything correctly until you are really sure you did everything right.
I had an other problem when i implemented GCM into my Project. It was giving out "Regestration OKay" but the REG_ID from GCM Server that i needed to read out, was giving me an Empty (not NULL) it was empty LOL.
I moved my MainActivity (where the regestration happens) in the "original" package of my project and it worked.
please follow Push Notification via GCM
if key for browser apps doesn't work, then create key with ip locking and replace it into your config.php file, it will sure work.
please also check whether your client side code works properly or not on this site
I am getting the GCM Registration Id now. I made two changes.
Removed debuggable=false from Manifest file. Wrote a code in the activity to check for version of Play Store.
So conclusion, it was the issue with play store version may be.