appinioGmbH / flutter_packages

Dart and Flutter plugins/packages used and maintained by @appinioGmbH
187 stars 214 forks source link

[appinio_social_share] [shareToFacebook] prop "hashtag" not working #48

Closed vanvixi closed 1 year ago

vanvixi commented 1 year ago

1. Android: Everything works perfectly. "hashtag" and "image" both successfully shared on Fb. 2. IOS: "image" successfully shared on Fb. But "hashtag" not working.

Note: I did not add the following permissions. Because my app doesn't use it.

  <key>NSPhotoLibraryUsageDescription</key>
  <string>$(PRODUCT_NAME) needs permission to access photos and videos on your device</string>
  <key>NSMicrophoneUsageDescription</key>
  <string>$(PRODUCT_NAME) does not require access to the microphone.</string>
  <key>NSCameraUsageDescription</key>
  <string>$(PRODUCT_NAME) requires access to the camera.</string>
  <key>NSAppleMusicUsageDescription</key>
  <string>$(PRODUCT_NAME) requires access to play music</string>
khanmujeeb687 commented 1 year ago

Hi @sakura-sakai . Which version of appinio_social_share are you using? I have tested version 0.2.0 and it works fine. Maybe you can add all the permission mentioned in the readme. https://user-images.githubusercontent.com/58891556/211582700-c65c6962-f770-4b96-9375-722af11ce12c.MP4

sadatd commented 1 year ago

Tested on both Android and iOS, works on both for me. Even though I had to do some more configs on Android that weren't mentioned in README.

khanmujeeb687 commented 1 year ago

Tested on both Android and iOS, works on both for me. Even though I had to do some more configs on Android that weren't mentioned in README.

Hi @sadatd can you share the additional config that you did for android?

sadatd commented 1 year ago

Sure, but my problem was that I could't share facebook post at all.
In /android/app/src/main/values folder create a strings.xml and add

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="facebook_app_id">[facebook_app_id]</string>
    <string name="facebook_client_token">[facebook_client_token]</string>
</resources>

In AndroidManifest.xml add

     <provider android:name="com.facebook.FacebookContentProvider" android:authorities="com.facebook.app.FacebookContentProvider[facebook_app_id]"
            android:exported="true" />
        <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id" />
        <meta-data android:name="com.facebook.sdk.ClientToken" android:value="@string/facebook_client_token" />