Is it possible to pre-fill the Facebook subscription, as it seems that some applications fill them?

According to Facebook's sharing policy, is the prefix not allowed? https://developers.facebook.com/docs/apps/review/prefill

I recently tried InstaWeather and Flickr iOS apps and they fill the header. So are they really allowed?

yVWIe.pngD0pgm.png

Can anyone clarify this?

+4
source share
2 answers

Based on the discussion in the FB Dev community (mentioned by the FB guys themselves), it’s clear that this is forbidden. These applications are mentioned and whoever does this is clearly in violation.

https://www.facebook.com/groups/fbdevelopers/961186750591506

+1
source

/action/story. Bellow FB . FB https://www.facebook.com/aklobanov

    NSURL *appUrl = [[NSURL alloc] initWithScheme:FB_APP_LINK_SCHEME host:FB_APP_LINK_HOST path:FB_APP_LINK];
    NSDictionary *objectProperties = @{
                                       @"og:type": @"protrackreader:jump",
                                       @"og:title": [NSString stringWithFormat:NSLocalizedString(@"F1", nil), [[self->jump number] stringValue], [[self->jump date] longDate]],
                                       @"og:rich_attachment": @"true",
                                       @"protrackreader:serial":[[self->jump altimeter] serial],
                                       @"protrackreader:freefall:value": [[self->jump freefall] stringValue],
                                       @"protrackreader:freefall:units": @"s",
                                       @"protrackreader:altitude_exit:value": [[self->jump exit] stringValue],
                                       @"protrackreader:altitude_exit:units": @"ft",
                                       @"protrackreader:altitude_open:value": [[self->jump open] stringValue],
                                       @"protrackreader:altitude_open:units": @"ft"
                                       };
    FBSDKShareOpenGraphObject *object = [FBSDKShareOpenGraphObject objectWithProperties:objectProperties];
    if (object != nil)
    {
        [object setURL:appUrl forKey:@"og:url"];
        UIImage *image = nil;
        if ([self->jump profile] != nil)
        {
            ProfileGraph *graph = nil;
            graph = [[ProfileGraph alloc] initWithDataObject:[self->jump profile]];
            if (graph != nil)
            {
                graph.speedMeasureValue = self->speedMeasureValue;
                graph.altitudeMeasureValue = self->altitudeMeasureValue;
                graph.speedMeasureText = self->speedMeasureText;
                graph.altitudeMeasureText = self->altitudeMeasureText;
                graph.themeName = kCPTSlateTheme;
                image = [graph renderGraphInImageWithRectangle:CGRectMake(0.0, 0.0, FB_IMAGE_WIDTH, FB_IMAGE_HEIGHT)];
                graph = nil;
            }
        }
        else
        {
            image = [UIImage imageNamed:@"protrack_reader_app"];
        }
        if (image != nil)
        {
            FBSDKSharePhoto *photo = [FBSDKSharePhoto photoWithImage:image userGenerated:NO];
            if (photo != nil) [object setPhoto:photo forKey:@"og:image"];
        }
        FBSDKShareOpenGraphAction *action = [FBSDKShareOpenGraphAction actionWithType:@"protrackreader:share" object:object key:@"protrackreader:jump"];
        if (action != nil)
        {
            [action setString:@"false" forKey:@"no_feed_story"];
            [action setString:@"true" forKey:@"fb:explicitly_shared"];
            FBSDKShareOpenGraphContent *content = [FBSDKShareOpenGraphContent new];
            if (content != nil)
            {
                content.previewPropertyName = @"protrackreader:jump";
                content.action = action;
                content.contentURL = appUrl;
                FBSDKShareAPI *api = [FBSDKShareAPI new];
                if (api != nil)
                {
                    api.shareContent = content;
                    api.delegate = self;
                    api.shouldFailOnDataError = YES;
                    error = nil;
                    if (![api validateWithError:&error])
                    {
                        [error reportError];
                    }
                    else
                    {
                        if ([api canShare])
                        {
                            if (self->hud != nil) self->hud = nil;
                            self->hud = [[MBProgressHUD alloc] initWithView:self.view];
                            self->hud.removeFromSuperViewOnHide = YES;
                            [self.view addSubview:self->hud];
                            self->hud.labelText = NSLocalizedString(@"H9",nil);
                            [self->hud show:YES];
                            return [api share];
                        }
                    }
                }
            }
        }
    }
0

Source: https://habr.com/ru/post/1608808/


All Articles