Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- message: "(#324) Requires upload file"
- <form id="postForm" name="postForm" ng-submit="createScheduledPost()" enctype="multipart/form-data">
- <textarea ng-model="message"></textarea>
- <div class="dropzone" file-dropzone="[image/png, image/jpeg, image/gif]" file="image" file-name="imageFileName" data-max-file-size="3">
- <span>Drop Image Here</span>
- </div>
- <div class="image-container">
- <img ng-src={{image}} ng-model="image" />
- <span class="file-name">{{imageFileName}}</span>
- </div>
- var app = angular.module('myapp');
- app.controller('MyCtrl', ['$scope', function ($scope) {
- $scope.createScheduledPost = function() {
- FB.api("/"+pageID+"/photos",
- "POST",
- {
- "caption" : $scope.message,
- "source" : $scope.image,
- "access_token" : pageAccessToken,
- "scheduled_publish_time": time,
- "published": false
- },
- function (response) {
- console.log(response);
- }
- );
- }
- }])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement