Facebookshare Causing Compiler Error After Update

FacebookShare causing compiler error after update

Regarding docs of FBSDKShareLinkContent these properties have been deprecated:

@deprecated contentDescription is deprecated from Graph API 2.9.
For more information, see https://developers.facebook.com/docs/apps/changelog#v2_9_deprecations.

@deprecated contentTitle is deprecated from Graph API 2.9.
For more information, see https://developers.facebook.com/docs/apps/changelog#v2_9_deprecations

@deprecated imageURL is deprecated from Graph API 2.9.
For more information, see https://developers.facebook.com/docs/apps/changelog#v2_9_deprecations

You should probably use quote and contentURL instead of them.

As a temporary solution, you can unblock the file LinkShareContent.swift and directly remove above lines until Facebook releases any update.

Failed to resolve: com.facebook.android:facebook-android-sdk:[4,5)

Follow the below procedure to resolve the issue:-

  1. Click on Project Structure from the icon available in the tool bar above.

  2. Open Dependencies tab.

  3. select

    com.facebook.android:facebook-android-sdk:[4,5)

  4. Remove the facebook dependency by clicking the minus(-) button on the extreme right side.

  5. Now, Click on Plus(+) button on the right side above Minus button. Select Library dependency

  6. Type Facebook on the search input box and click on the search button.

  7. Choose com.facebook.android:facebook-login. click on Ok.
    Sync your Gradle.

This will resolve your issue. As it has worked for me.

android:exported added but still getting error Apps targeting Android 12 and higher are required to specify an explicit value for android:exported

To solve this error in target sdk 31-

1.First of all set target sdk to 30

2.Then go to the merged manifest

3.Find if there’s any activity, service, receiver or provider that does not have android:exported set.Override all those entries and set their android:exported to true or false.

4.set target sdk back to 31 and run project

Xcode 11.4 compile error 'Missing package product package name '

Solution 1: File > Swift Packages > Reset Package Caches

Sample Image

Solution 2: File > Swift Packages > Update to Latest Package Versions

Sample Image

Error 403 when clicking Share

I setup some Facebook bot logging

Facebook bot tracking in /index.php
facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)

Clicking the Facebook share button does not trigger the facebook bot to download the page.
The webpage download (Crawl) by the Facebook bot is triggered by the JavaScript SDK, and you can't load the share windows without the SDK.
The bot crawl is also triggered by publishing the URL anywhere on facebook.

Facebook SDK

(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/ru_RU/all.js#xfbml=1&appId=368997699815031";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));

Facebook downloads 2 pages with every 1 request (depends on the SDK config):

[2014-03-13 10:34:57][facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)] /films/events/mtv-movie-awards-2014.html
[2014-03-13 10:34:59][facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)] /films/events/mtv-movie-awards-2014.html?fb_locale=ru_RU

If Facebook downloads a page with an error status, Facebook will not re-download it unless you download it with the Facebook lint debugger tool or some unknown to me timeout runs out. (unless you specify this timeout manually in og:ttl)

In my case the facebook SDK requested the page while it was still being edited and cached the 403 response that it was giving.

The preview/story (or whatever you call it) shows the same text and status code that your website returned when the Facebook bot downloaded the webpage.

Error in Facebook Share Dialog

com.facebook.FacebookException: Unable to create Intent; this likely
means the Facebook app is not installed

Quoting from step 2 @ https://developers.facebook.com/docs/android/getting-started/facebook-sdk-for-android/

The Facebook SDK uses Facebook's native app to provide support for authentication when it's present. On a real device, you can test this by simply installing this app for free from Google Play. However, it's not possible to access Google Play on an emulator. If you want to test the flow there, we include a copy in the SDK that you can install.

The installable APK of the Facebook app is in the bin folder of the SDK, and named FBAndroid-3.5.apk or similar. To install it onto an Android emulator, you'll first need to start the emulator.

Secondly, locate the adb tool in the platform-tools directory of your main Android SDK. On OS X, you will have chosen this location when you unzipped the Android SDK. On Windows, the SDK is installed into your home directory, under AppData\Local\Android\android-sdk

Assuming you've placed the Facebook SDK in your home directory, you use adb to install the APK to the running emulator in OS X like this:

./adb install ~/facebook-android-sdk-3.5/bin/FBAndroid-3.5.apk

And on Windows, like this:

adb install %HOMEPATH%\facebook-android-sdk-3.5\bin\FBAndroid-3.5.apk
Once complete, check the apps screen of the emulator to check that the app has been installed correctly. If you need to force the upgrade of this app from a previous version, add the -r flag, like this on OS X:

./adb install -r ~/facebook-android-sdk-3.5/bin/FBAndroid-3.5.apk


Related Topics



Leave a reply



Submit