{"action":"created","issue":{"url":"https://api.github.com/repos/invertase/react-native-firebase/issues/1381","repository_url":"https://api.github.com/repos/invertase/react-native-firebase","labels_url":"https://api.github.com/repos/invertase/react-native-firebase/issues/1381/labels{/name}","comments_url":"https://api.github.com/repos/invertase/react-native-firebase/issues/1381/comments","events_url":"https://api.github.com/repos/invertase/react-native-firebase/issues/1381/events","html_url":"https://github.com/invertase/react-native-firebase/issues/1381","id":348718447,"node_id":"MDU6SXNzdWUzNDg3MTg0NDc=","number":1381,"title":"Not getting short dynamic url","user":{"login":"sujitpk-perennial","id":23031821,"node_id":"MDQ6VXNlcjIzMDMxODIx","avatar_url":"https://avatars1.githubusercontent.com/u/23031821?v=4","gravatar_id":"","url":"https://api.github.com/users/sujitpk-perennial","html_url":"https://github.com/sujitpk-perennial","followers_url":"https://api.github.com/users/sujitpk-perennial/followers","following_url":"https://api.github.com/users/sujitpk-perennial/following{/other_user}","gists_url":"https://api.github.com/users/sujitpk-perennial/gists{/gist_id}","starred_url":"https://api.github.com/users/sujitpk-perennial/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sujitpk-perennial/subscriptions","organizations_url":"https://api.github.com/users/sujitpk-perennial/orgs","repos_url":"https://api.github.com/users/sujitpk-perennial/repos","events_url":"https://api.github.com/users/sujitpk-perennial/events{/privacy}","received_events_url":"https://api.github.com/users/sujitpk-perennial/received_events","type":"User","site_admin":false},"labels":[{"id":769510160,"node_id":"MDU6TGFiZWw3Njk1MTAxNjA=","url":"https://api.github.com/repos/invertase/react-native-firebase/labels/links","name":"links","color":"fcedc7","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-08-08T13:08:49Z","updated_at":"2018-09-12T10:11:46Z","closed_at":null,"author_association":"NONE","body":"Hello Team, \r\n\r\n     I am using dynamic link feature to create a deep link. I am able to create long link and able to share with the contacts. \r\n    I tried to use createShortDynamicLink, but it is not working.\r\n    Following is my code.\r\n\r\n```\r\nlink = \"www.test.com\" + \"?referrer\" + postIds.toString()\r\n        const firebaseLInk =\r\n            new firebase.links.DynamicLink(link, 'wby5w.app.goo.gl')\r\n                .android.setPackageName('app_package_name')\r\n                .ios.setBundleId('app_package_name');\r\n\r\n        firebase.links().createShortDynamicLink(firebaseLInk)\r\n            .then((url) => {\r\n\r\n                let shareImageBase64 = {\r\n                    message: \"Click here to checkout my favorite posts for home decor \" + url,\r\n                    url: \"data:image/png;base64,\".concat(base64String),\r\n                    type: \"image/png\",\r\n                    subject: \"Favorite Posts\"\r\n                };\r\n                 Share.open(shareImageBase64);\r\n            });\r\n\r\n```\r\n\r\n     In the above code I am not getting url. I checked the RNFirebaseLinks.java file from react-native-firebase and links folder, here I found the createShortDynamicLink function. Following is the code from that function.\r\n\r\n ```\r\nshortLinkTask.addOnCompleteListener(new OnCompleteListener<ShortDynamicLink>() {\r\n          @Override\r\n          public void **onComplete**(@NonNull Task<ShortDynamicLink> task) {\r\n        if (task.isSuccessful()) {\r\n          String shortLink = task.getResult().getShortLink().toString();\r\n          Log.d(TAG, \"created short dynamic link: \" + shortLink);\r\n          promise.resolve(shortLink);\r\n        } else {\r\n          Log.e(TAG, \"create short dynamic link failure \" + task.getException().getMessage());\r\n          promise.reject(\"links/failure\", task.getException().getMessage(), task.getException());\r\n        }\r\n        }\r\n      });\r\n    } **catch** (Exception ex) {\r\n      Log.e(TAG, \"create short dynamic link failure \" + ex.getMessage());\r\n      promise.reject(\"links/failure\", ex.getMessage(), ex);\r\n    }\r\n\r\n```\r\n     Here code is not entering into **onComplete** or **catch** block. \r\n     \r\n     Please let me know if I miss anything here. \r\n     react-native-firebase - v4.1.0\r\n     react-native - v0.50.1\r\n     implementation \"com.google.firebase:firebase-invites:15.0.1\"  from build.gradle     \r\n\r\n\r\n\r\n\r\n \r\n\r\n    \r\n\r\n"},"comment":{"url":"https://api.github.com/repos/invertase/react-native-firebase/issues/comments/420591450","html_url":"https://github.com/invertase/react-native-firebase/issues/1381#issuecomment-420591450","issue_url":"https://api.github.com/repos/invertase/react-native-firebase/issues/1381","id":420591450,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMDU5MTQ1MA==","user":{"login":"stale[bot]","id":26384082,"node_id":"MDM6Qm90MjYzODQwODI=","avatar_url":"https://avatars3.githubusercontent.com/in/1724?v=4","gravatar_id":"","url":"https://api.github.com/users/stale%5Bbot%5D","html_url":"https://github.com/apps/stale","followers_url":"https://api.github.com/users/stale%5Bbot%5D/followers","following_url":"https://api.github.com/users/stale%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/stale%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/stale%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stale%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/stale%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/stale%5Bbot%5D/repos","events_url":"https://api.github.com/users/stale%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/stale%5Bbot%5D/received_events","type":"Bot","site_admin":false},"created_at":"2018-09-12T10:11:46Z","updated_at":"2018-09-12T10:11:46Z","author_association":"NONE","body":"Hello 👋, this issue has been automatically marked as stale because it has not had activity for quite some time.  Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no  further activity occurs. Thank you for your contributions.\n"}}
{"actor":{"display_login":"stale"}}