Hand-travel access to those pits on Facebook

Source: Internet
Author: User

The previous job required Facebook to be plugged into the hands of the tour, and wrote a blog post on "hand-over-access to Facebook features". At that time, the Facebook SDK version is still 3.x, the code integration is relatively low, the integration is also more troublesome. The text only slightly mentioned the next function, and then threw a GitHub demo link, some details of the problem is not described.

Then there was another project in the company that had Facebook's access requirements and was specifically implemented by their operators, and we had a lot of discussion about the issue of Facebook rights audits, so that later they built a Facebook SDK development group directly, There are often other developers searching for this group to communicate problems. The Facebook SDK has also been updated with the 4.x version (the interface is completely changed, but more elegant.) The demo,android version on GitHub has been updated with the 4.x SDK), and I feel a lot of problems can be recorded, so I have this article.


1. About whether you need to upload apps to Facebook review: https://developers.facebook.com/docs/facebook-login/permissions/#noreview

A) feature points that do not require auditing:

Third-party login with FB: Facebook Login
Get information about the login FB account, permissions: Public_profile
Get login FB account with app friend information, permissions: User_friends
Using the FB app invite feature: App Invites
Share saved text or links using fb: Sharing
Share your local pictures with Facebook clients on your device

b) functional points that need to be audited:

Non-test account to share local picture permissions directly via the FB API without the presence of Facebook client on the device: publish_actions


2. About FB Audit:

FB Audit and Apple audit compared to fast, often a business day to give results. But they return the error description too formatted, also relatively brief. It might make people feel strange, so. And there seems to be no complaint process, the results of the audit is not satisfied with the explanation to write the details and then submit again.
Because the audit is the authority and not the app itself, nor through the FB to release. We can audit out a version, anyway, it was reviewed, the real version can be another

A) reason for refusal: we cannot reproduce the personalized experience of the feature you requested on this platform. Please submit a version of the app using this feature with detailed step instructions.



Because the FB audit staff and Apple's audit is not the same, most of them do not understand Chinese.

Solution: The steps and descriptions are best written in English, and the submitted maps are in the order of 1.2.3, with enough annotations.
Hidden in a relatively deep function, you can specifically make an audit version, placed in the easy to trigger the place. For example, my original share is to share after the end of the battle, audit always said that the smooth sharing, and finally I submitted a version of the FB audit directly in the login screen put a share button to solve the problem.

b) Reason for refusal: the user must enter all content in the user message field



Sharing cannot have pre-built content. For example, when you try to share, the auto-fill "xxx game is really fun, you also play together", such as, the audit may be dismissed (then your SDK to this interface why ...) )

Solution: Ibid, still is out of the audit version when not populated, the official version of obedient while look is ...

c) Reasons for refusal: This permission is not your application.



For example, your app uses social plugins or sharing dialogs to share content with Facebook. These operations do not require publish_actions permissions and are not subject to approval.

I encountered the situation is to share the need to apply for publish_actions when encountered. This is actually a problem for the auditors to consider poorly. As mentioned in the Audit Function point section above, if the user's device does not have FB app, then sharing local files is required for this permission.

Solution: Submit again, and in the repro step, emphasize that you need permission to share a local image in a device that does not have the FB app installed. You can also upload the inclusion of this (for yourself under the appropriate permission) to show him to improve the persuasion, and then pray that the next audit of the staff can be serious and professional points.



D) Reasons for refusal: Your app must not use a Facebook Web dialog.utilize we native Facebook Login SDK for IOS, so the users do not NE Ed to login twice.

This is a reason to compare the pit daddy. Because the first sentence do not use the Facebook web dialog, it is easy to let people mistakenly think that is not allowed under any circumstances, but this is not realistic, because there is no FB app, you have to use this form. In fact, the real situation is:

You: Speaking
FB: In the case of the FB app on the device, do not let the user log in as a web dialog.

This should be understood.

Solution: Check in the case of FB app, call the login interface, will go to the FB app to log in (if the FB app is signed in the status does not need to login). Instead of popping up the browser page or letting the user enter a password in the in-app pop-up window.
On the FB console, on the Settings page, open the single sign.



3. Complicated diseases

A) You can log in with a test permission or a higher permission number, and the normal account cannot log in.

Because the app is not set to an externally available state.

Solution: Go to FB console, Status&review sub-page, put the top right corner "Do you want to made this app and all its live features available to the general publ IC? " The large switch on the side is set to the open state.

b) The integration code seems to have been added, but the trigger-related function is not effective or will flash back

Usually the document is not read carefully or there are gaps caused. Take a look at the two-version Getting Started section and check again.

Android:AndroidManifest.xml FB related provider/meta-data/activity did not add, or did not change to the corresponding SDK version of the format (3.X/4. X's provider and activity contents vary slightly)
Strings.xml facebook_app_id didn't add.

Ios:plist inside Facebookappid/facebookdisplayname/url Types
Application delegate inside Applicationdidbecomeactive/didfinishlaunchingwithoptions/openurl not add a response to the FB code

c) Login Successful callback, there is accesstoken, but the profile data is not normal

Solution: Refer to the previous point to see if it's all added up.

Android: Call Profile.fetchprofileforcurrentaccesstoken () after acquiring to Accesstoken;

IOS: Add [fbsdkprofile enableupdatesonaccesstokenchange:yes];

D) When implementing the app invite, it prompts the app link to have a problem

Solution: This link must go to FB create: Https://developers.facebook.com/quickstarts/?platform=app-links-host

e) The APP invite is not receiving a message after the call is successful:

If the other party already has the application installed, then you have to set up his FB account as a tester to receive the message again. See the official website for a testing section

Reference: http://stackoverflow.com/questions/29484815/ Fbsdkappinvitedialog-in-facebook-ios-sdk-version-4-0-1-invite-successfully-sent


4. Other

A) Use graph API Explorer.

Can be more convenient to simulate the data back and forth, can also be used to clean up permissions.

b) If you upgrade to iOS SDK 4.x, you will no longer support iOS7 systems, such as iOS6. This has to be negotiated with the operation.

c) When writing this article, because it has not been saved, so the basic use is in the group or private chat in others. found that they appear to be in Chinese, and I was at that time I encountered the audit error message appears to be in English

Later found official web page, FB official can choose a View page language, some pages have FB official translation. English bitter hands can be considered for use.

But it may be better to read English directly, because not all of the pages have official translations, some page translation may be out of date, and Google, usually in English as a key word in order to easily find useful information from StackOverflow

5. Resources

A) FB official SDK source code and demo

Https://github.com/facebook
Https://github.com/facebookarchive

b) COCOS2DX Access demo. (FB SDK version: Android 4.x/ios 3.x)

https://github.com/piaopolar/FacebookPlugin/

c) FB SDK Integration Discussion QQ Group: Facebook SDK Development 340348340


Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Hand-travel access to those pits on Facebook

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.