-
-
Notifications
You must be signed in to change notification settings - Fork 423
Closed
Milestone
Description
From v22.0 , there is no more support for 'instagram_actor_id'. So we need to use 'instagram_user_id' instead.
But, there is not a field name 'instagram_user_id' in AdCreativeObjectStorySpec.java
Below is my current code snippet , it runs well before v22.0.
But after just upgrading to v22.0 , I got the error messages.
List<Parameter> parameters = Lists.newArrayList();
parameters.add(Parameter.with("name", adCreative.getName()));
if (adCreative.getObjectType() != null) parameters.add(Parameter.with("object_type", adCreative.getObjectType()));
if (adCreative.getApplinkTreatment() != null) parameters.add(Parameter.with("applink_treatment", adCreative.getApplinkTreatment()));
parameters.add(Parameter.with("object_story_spec", adCreative.getObjectStorySpec()));
if (adCreative.getOmnichannelLinkSpec() != null) parameters.add(Parameter.with("omnichannel_link_spec", adCreative.getOmnichannelLinkSpec()));
if (adCreative.getDegreesOfFreedomSpec() != null) parameters.add(Parameter.with("degrees_of_freedom_spec", adCreative.getDegreesOfFreedomSpec()));
GraphResponse publishAdResponse = facebookClient.publish("act_"+adAccountId+"/adcreatives", GraphResponse.class,
parameters.toArray(new Parameter[parameters.size()])
);
Below is error log
com.restfb.exception.FacebookOAuthException: Received Facebook error response of type OAuthException: Invalid parameter (code 100, subcode 2238281) 'Instagram actor ID is not supported in object_story_spec parameter - instagram_actor_id is not supported in object_story_spec. Please use instagram_user_id field in object_story_spec with a valid Instagram User ID value instead.'
at com.restfb.exception.generator.DefaultFacebookExceptionGenerator$DefaultGraphFacebookExceptionMapper.exceptionForTypeAndMessage(DefaultFacebookExceptionGenerator.java:181)
at com.restfb.exception.generator.DefaultFacebookExceptionGenerator.throwFacebookResponseStatusExceptionIfNecessary(DefaultFacebookExceptionGenerator.java:65)