Facebook native ads error - android

I'm trying to integrate fb native ads in android but its giving me error every time I try to fetch an ad.
When I log the error its showing error code as -1 and unknown message
I have followed full documentation from https://developers.facebook.com/docs/audience-network/android/nativeadsmanager while integrating but couldn't find any solution
Thanks

May be you are using the wrong dependency. Replace the following dependency (or whatever number you have before :+:
implementation 'com.facebook.android:audience-network-sdk:5.+'
with
implementation 'com.facebook.android:audience-network-sdk:5.0.1'

Related

Login with facebook shows error as unsupported request and failed to login

Login with facebook shows unsupported request and failed to login with unsupported request.
I am using implementation 'com.facebook.android:facebook-android-sdk:12.1.0'
I have added these permissions ["email", "public_profile"]
I'm not exactly sure about your situation but I came across this error message myself in the last few days after updating my Facebook SDK.
After reading through some documentation I found this page...
https://developers.facebook.com/docs/facebook-login/android/deprecating-webviews
which talked about web views being deprecated and to ensure that custom tabs were setup correctly, which in turn lead me here...
https://developer.chrome.com/docs/android/custom-tabs/
I found that Facebook SDK 12.1 required that I set androidx.browser:browser to 1.3.0 or higher to function properly with custom tabs.
This required me to then increase my minSdkVersion to 24 which I didn't want to do.
So after a bit more experimenting I found that I could go back to Facebook SDK 8.2, which still functioned fine in my case, and continue using an older version of androidx.browser:browser allowing me to keep the lower minSdkVersion.
Hopefully that helps you too.
Edit:
Just for completeness, what I am currently using in my dependencies is...
implementation 'com.facebook.android:facebook-login:8.2.0'
implementation 'androidx.browser:browser:1.0.0'
and to get Facebook login 12.1 working I had to use...
implementation 'com.facebook.android:facebook-login:12.1.0'
implementation 'androidx.browser:browser:1.3.0'

Android Facebook Account Kit Crash - missing metadata: /com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CN

I am suddenly getting a number of crash reports around this the past few weeks. The crashes indicated missing metadata for certain country code. Most of them have been one of:
PhoneNumberMetadataProto_CN
PhoneNumberMetadataProto_BR
PhoneNumberMetadataProto_IR
The crashes seems to have occurred out of nowhere. I attempted to upgrade the AccountKit version from 4.28.0 to 4.31.0. This resulted in a moving where the crash occurred from com.facebook.accountkit.internal.Utility.parseNumber to com.facebook.accountkit.ui.PhoneNumberTextWatcher.getFormattedNumber but the crash is still occurring.
My next plan of attack is to try including the com.googlecode.libphonenumber dependency directly via Gradle instead of letting it just get included transitively from the AccountKit SDK, but I'm not holding my breath that it will fix the problem. Any other ideas are much appreciated.
I am having same problem here.
i am endup with adding dependency in gradle (like your next plan). Its working fine.
dependencies {
...
compile 'com.googlecode.libphonenumber:libphonenumber:8.+'
}

How to remove a play store error "unsafe implementation of HostnameVerifier"

I am getting the following error,
Security alert Your app is using an unsafe implementation of
HostnameVerifier.
Please see this Google Help Center article for
details, including the deadline for fixing the vulnerability.
Vulnerable classes: com.paytm.pgsdk.i Affects APK version 10.
while uploading my app on google play. My app has paytm integrated with Paytm sdk.
Please help me with any solution or suggestion how to resolve this error.
Thanks.
I got a solution to remove the error "unsafe implementation of HostnameVerifier".
Simply use in https URLs in both the PaytmMerchant URLs
(inChecksumGenerationURL and inChecksumVerificationURL).

Add Facebook Audience Network Mediation to application

I am using Eclipse and I try to show ads via the Facebook Audience Network. I have added the "AudienceNetwork.jar" from the official Facebook SDK, and the "FacebookAdapter.jar" from the AdMob Mediation Networks.
I should mention that I monetize via the AdMob and do not use proguard.
My problem is that when I try to load ads, I get the following error:
02-19 20:07:35.315: I/Ads(23957): Instantiating mediation adapter: com.google.ads.mediation.facebook.FacebookAdapter
02-19 20:07:35.316: I/dalvikvm(23957): Failed resolving Lcom/google/ads/mediation/facebook/FacebookAdapter; interface 1798 'Lcom/google/android/gms/ads/mediation/MediationInterstitialAdapter;'
02-19 20:07:35.316: W/dalvikvm(23957): Link of class 'Lcom/google/ads/mediation/facebook/FacebookAdapter;' failed
02-19 20:07:35.316: W/Ads(23957): Could not instantiate mediation adapter: com.google.ads.mediation.facebook.FacebookAdapter. com.google.ads.mediation.facebook.FacebookAdapter
According to this and this post, this should happen only if I used proguard, which I don't.
Does anyone has a suggestion on why this happens?
And why doesn't the Facebook itself have any documentation on how to integrate the Audience Network via AdMob, since the first is supported by the latter one? :-)
It doesn't look like com/google/ads/mediation/facebook/FacebookAdapter is contained within your APK. Check your APK, your build process, how you have added the FacebookAdapter library and the contents of the FacebookAdapter library itself.
I tried with a banner ad. Wanted to load ads from Facebook Audience Networrk through Admob mediation when I ended up with the same error.
Please make sure you added the Google Play Services Lib to your build path and check if your version of the Google Play Services Lib contains the MediationInterstitialAdapter.class and the MediationNativeAdapter.class. Mine did not (still working with eclipse) and so the FacebookAdapter was searching for a class that was not there.
After updating to a newer version (links here: How to download older google play services?) the mediation now works fine for me. :)

AdMob add not display Ad in Android App with AndEngine

I have followed all the steps for adding an AdMob Ad into my app from the link at
http://www.wikihow.com/Add-Advertisements-to-Your-Android-Applications-Using-Admob
But when I run my App it does not display the Ad. My app uses AndEngine and hence the target =android-17 as opposed to android-13 specified in the link which causes compilation errors. I added the method onCreateBundle() and wanted to test AdMob. But I get this error in logCat
in my activity_main.xml for with the message
"Error inflating class com.google.ads.Adview. I can see that the jar file has been added to the build path.
Can you please let me know what I am doing wrong. I added the code more than 12 hours back and yet there is no display.
The problems was fixed by by clicking Project->Propoerties->Build Path-> Order & Export and then building. See
Error inflating class com.google.ads.AdView

Categories

Resources