1
0
Fork 0
timelinize/datasources/facebook/facebook.go

46 lines
1.6 KiB
Go

/*
Timelinize
Copyright (c) 2013 Matthew Holt
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
// Package facebook implements the Facebook service by supporting account
// export files and also the Graph API: https://developers.facebook.com/docs/graph-api
package facebook
import (
"github.com/timelinize/timelinize/timeline"
"go.uber.org/zap"
)
func init() {
err := timeline.RegisterDataSource(timeline.DataSource{
Name: "facebook",
Title: "Facebook",
Icon: "facebook.svg",
NewOptions: func() any { return new(Options) },
NewFileImporter: func() timeline.FileImporter { return new(Archive) },
})
if err != nil {
timeline.Log.Fatal("registering data source", zap.Error(err))
}
}
type Options struct {
// The Facebook username of the account from whence this data came.
// Required input, since with multi-archive exports, there's no
// guarantee that the profile information is in the first archive.
Username string `json:"username,omitempty"`
}